not a valid MySQL result resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello and thank you for your time.
can you tell me why the below: i think this whole section is line 22 because whatever i change in these first four lines still has the error message point to line 22.
$cobj = mysql_db_query($dbname,"select * from category where id=$category"); //line 22
$crow = mysql_fetch_object($cobj);
$scobj = mysql_db_query($dbname,"select * from subcategory where category=$category");
$scrow = mysql_fetch_object($scobj);

<? echo $crow->name;?>
<? echo $scrow->name;?>

gives me this:
Warning: Supplied argument is not a valid MySQL result resource in /users/infoserv/web/register/ca/direct.php on line 22


perhaps i should use something different. i am trying to print the results from two previous selections on this third page. the second page works with
$cobj = mysql_db_query($dbname,"select * from category where id=$category");
$crow = mysql_fetch_object($cobj);
<? echo $crow->name;?>

and then they make selection two...
thank you again. addison
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux