Hey all,

I don't really ask for help that often but this time I really need it. I am running a query in my program and from the mysql> prompt I can run the query fine. When I try to run the query even in phpmyadmin it gets no result. The query and some code is

PHP Code:

$q2 
"select ID from Weekly_Status where user_id = $userid LIMIT 1";
$r2 mysql_query($r2);

$array mysql_fetch_array($r2);

$ID $array["$ID"];

echo 
$ID
Of course my tables have all the required fields, I have also changed the variable "user_id = $userid" to "user_id = 5" which is should do. If anyone know why this happens please let me know.

Regards,
Paul