syntax help

From: Date: Thu, 14 Dec 2000 18:26:12 +0000
Subject: syntax help
Groups: php.general 
Request: Send a blank email to php-general+get-30245@lists.php.net to get a copy of this message
Hi all, This is perhaps pretty simple for experienced php guys. I was trying to do the "next/previous" menu to display list of search results. And after I ran the query, I got the message error as shown below: "Waring: 0 (mean zero) is not Mysql result index in ..... line 141" And the error is directed to the part of my code as shown here: $perPage = 10 ; if (!$page) { $page = 1; } $prePage = $page - 1 ; $nextPage = $page + 1; $pageStart = (($perPage * $page) - $perPage)+1; $queryoffers = "select * from TABLENAME where id ='$id'"; $queryoffers = $queryoffers . "LIMIT $pageStart, $perPage"; $resultofrs = mysql_query($queryoffers); $numRows = mysql_num_rows($resultofrs); if (($numRows) > 0) { file://<--------------This is line 141 while($row = mysql_fetch_array($resultofrs)) { ....the html bit to display the results found. } } else { echo " not found "; } Can anybody please guide me what is the problem? and what is the correct way to do it? Jack jacky@activelifestyle.com "Power is nothing without control

« previous php.general (#30245) next »