> I am new to php and that the folowing error: Warning:
> supplied argument is not a valid MySQL result resource in
> /home/tbonestu/public_html/smallimages.php
> i dont know what i am doing wrong here is the code:
>  @ $db = mysql_pconnect(connect info);
>  mysql_select_db("images");
>  $query = "select * from images where type =".$type."";
>  $result = mysql_query($query);
>  $num_results = mysql_num_rows($result);

That generally means your query failed. Try to echo mysql_error() after
your query to see what the problem is. You probably need quotes around
$type or $type has no value.

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to