RE: [PHP] syntax help
| From: | Mark Roedel | Date: | Thu, 14 Dec 2000 14:48:05 +0000 |
| Subject: | RE: [PHP] syntax help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30289@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jacky [mailto:jacky@activelifestyle.com]
> Sent: Thursday, December 14, 2000 12:26 PM
> To: php-general@lists.php.net
> Subject: [PHP] syntax help
>
>
> 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:
> $queryoffers = "select * from TABLENAME where id ='$id'";
> $queryoffers = $queryoffers . "LIMIT $pageStart, $perPage";
Echoing your query string is a good troubleshooting tool. So is the
mysql_error() function.
Either one of those, in this case, would likely show you that you haven't
left any space between "...id='$id'" and "LIMIT..."
---
Mark Roedel | "The most valuable function performed by
Systems Programmer | the federal government is entertainment"
LeTourneau University |
Longview, Texas, USA | -- Dave Barry