Hoi!
Als ik dit doe krijg ik de error: "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /mnt/home/**/domains/**/public_html/**/reacties.php on line 12"
Lijn 12 is de query..
$fetch[id] klopt; er kwam een gewoon getal uit.
toevoeging op 7 juni 2012, 20:36:45:
Het zal wel een domme fout zijn, maar ik kom er niet uit
Als ik dit doe krijg ik de error: "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /mnt/home/**/domains/**/public_html/**/reacties.php on line 12"
[COLOR= #0000BB]<?php
$selReacties[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM messages WHERE on_which="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ORDER BY id DESC"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selReacties[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selReacties[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]geen reacties.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]woah wel reacties[/COLOR][COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}[/COLOR]
?> Lijn 12 is de query..
$fetch[id] klopt; er kwam een gewoon getal uit.
toevoeging op 7 juni 2012, 20:36:45:
Het zal wel een domme fout zijn, maar ik kom er niet uit

