0
$queryget = mysql_query("SELECT * FROM image WHERE user_id = '$user_id_s'");

while($row = mysql_fetch_assoc($queryget))
{   
    $count_c = $row['image_comment'];
    $count_image++;
    $count_comment = $count_comment + $count_c;

}

for some reason it is not going inside the while loop and ideas?

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by hwoarang69
1

I know it sounds silly.. but it's happened to me before that I didn't put a semi-colon at the end of my sql query, and it failed since SQL was waiting for a new command...

Try:

$queryget = mysql_query("SELECT * FROM image WHERE user_id = '$user_id_s';");

If that doesnt work, change it to

  $queryget = mysql_query("SELECT * FROM image WHERE user_id = '$user_id_s';") or die (mysql_error());

and see where it is failing.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.