Re: mysql_db_query question

From: Date: Fri, 01 Sep 2000 15:11:00 +0000
Subject: Re: mysql_db_query question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14823@lists.php.net to get a copy of this message
What's the problem? You seem to be getting what you are asking for. If you want the results of the query, then you need to fetch them using something like mysql_fetch_array(). There is an example in the manual for PHP while($row=msql_fetch_array($result)) { echo $row["column name 1"]; echo $row["column name 2"]; ) mysql_free_result($result); On Thu, 31 Aug 2000, Chuck Barnett wrote: > Hello, I don't know what is going on here. I am running a simple query on a > db to get the max number of rows then a query with LIMIT in it. but the > second mysql_db_query does not work. Here is the source: > > $result=mysql_db_query("wildlife",$query,$link); > $max_num=mysql_num_rows($result); > echo $max_num ." ". $result; > > $query.=" LIMIT $offset,10"; > $result=mysql_db_query("wildlife",$query,$link); > echo "<br>".$result."<br>".$query; > > > this is what it returns. > > 40 2 > 3 > select * from prints LIMIT 0,10 > > Thanks for the help. > > Chuck > > >

« previous php.general (#14823) next »