Fetch_assoc werkt niet

Gestart doorOne2xs3 reacties23 weergaven

4 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Hoi,

Ik probeer dit:

[COLOR= #0000BB]<?php
$testerQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM pages WHERE author = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$testerFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$testerQuery[/COLOR][COLOR= #007700])){[/COLOR]

[COLOR= #0000BB]$testerFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]author[/COLOR][COLOR= #007700]];

}[/COLOR]
?>


En als ik dat uittest krijg ik niks, en als ik de mysql_num_rows doe op $testerQuery krijg ik 1 terug, dus er is wel iets in die table.

Kan iemand me helpen?
0
Tgrm

Lid

Berichten
2.133
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raoulfloks schreef:
Hoi,

Ik probeer dit:

[COLOR= #0000BB]<?php
$testerQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM pages WHERE author = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$testerFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$testerQuery[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$testerFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]author[/COLOR][COLOR= #007700]];

}[/COLOR]
?>
Tadaa redface
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Omg ik ben al redelijk gevorderd met php en dan vergeet ik een echo emoNoob fout maar thx emoemoemo
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lol das idd best falend 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