PHP fout

Gestart doorAdmir5 reacties33 weergaven

6 berichten · pagina 1 van 1

Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hey,

Ik zit hier met een script fout:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/user4003/domains/straat-power.nl/public_html/prive/index.php on line 456

Dit is dat line:

while($sFetch = mysql_fetch_array($sQuery))


En dit is alles:

[COLOR= #0000BB]<?php[/COLOR]

        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sQuery[/COLOR][COLOR= #007700]))

    {[/COLOR]

        [COLOR= #0000BB]$nameQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uName, uCol FROM member_accounts WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nAuthor[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$nameFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameQuery[/COLOR][COLOR= #007700]);[/COLOR]

       

        [COLOR= #0000BB]$countQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT count(cId) AS commentCount FROM member_news_comment WHERE cNewsId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" AND cVisible = 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

        [COLOR= #0000BB]$countFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$countQuery[/COLOR][COLOR= #007700]);[/COLOR]

        ?>

                <img src="http://www.imgdumper.nl/uploads2/4b5328a4a04a5/4b5328a491e37-plaatje.png" alt="- banner1" />

                <div class="desc">

                        <div class="block">

                                <h2>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nTitle[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR] ?></h2>

                                <small>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<i>Door <a href="index.php?p=profiel&amp;id=[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nAuthor[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"><span style="color:[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$nameFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCol[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]; font-weight: bold;">[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]</span></a>, [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$sFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nDate[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]</i>[/COLOR][COLOR= #007700];[/COLOR] ?></small>

                               

                                <p>Afgelopen week berichtte Kempi al via Twitter dat de politie een inval bij hem hadden gedaan, omdat ze op zoek zijn naar zijn broertje Klemma. We horen dat hij nog steeds ondergedoken zit. Kempi is ondanks deze moeilijke situatie momenteel hard bezig om Klemmas eerste wapenfeit via Sterrenlaan te releasen... <br /><a href="#" target="_blank">Lees meer</a> </p>

                        </div>

                </div>


Kan iemand helpen om dit te fixxen?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is $sQuery ?
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
#
[COLOR= #0000BB]<?php

$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM member_news "[/COLOR] [COLOR= #007700]. ([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]3[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) ==[/COLOR] TRUE [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]WHERE nVisible = 1[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]" ORDER BY nDate DESC LIMIT = 4"[/COLOR][COLOR= #007700]);[/COLOR]

?>
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
er staan 2 spaties als is_auth(3, $_SESSION[uId]) == TRUE?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Sjoerd schreef:
er staan 2 spaties als is_auth(3, $_SESSION[uId]) == TRUE?
Dat maakt niet uit,

het komt door:
LIMIT = 4

Je moet

LIMIT 0, 4 doen yummie
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ow, niet eens op gelet emo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren