note 40658 added to function.mysql-query

From: Date: Wed, 10 Mar 2004 21:16:58 +0000
Subject: note 40658 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-66581@lists.php.net to get a copy of this message
i am new to PHP and having some basic difficulties trying to retrieve info from my dbase! I keep getting error saying 'query is empty' <?php $dbase= mysql_connect("localhost", "", "") or die("Unable to connect to SQL server"); mysql_select_db("",$dbase) or die("Unable to select database"); mysql_query($result, $dbase) or die (mysql_error()); $result= mysql_query("SELECT * FROM tblCategory"); if($myrow = mysql_fetch_array($result)) do{ $catname = $myrow["vchrCategoryName"]; $catdescr = $myrow["vchrCategoryDescr"]; $bodystring .= "$catname - $catdesc"; } while ($myrow = mysql_fetch_array($result)); print <<<EOF can anyone spot what i'm doing wrong? sorry if sound stupid ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40658 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40658&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40658&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66581) next »