Re: Re: Help: Database Search
| From: | James Kaufman | Date: | Sat, 13 Nov 2004 14:12:30 +0000 |
| Subject: | Re: Re: Help: Database Search | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201910@lists.php.net to get a copy of this message | ||
Stuart,
On Sat, Nov 13, 2004 at 05:31:06AM -0800, Stuart Felenstein wrote:
>
> It was not apparent whatsoever. Let me show the code
> again , but I'll include the print_r returns inline
> code.
>
> <?php
> $sql = 'SELECT PostStart, JobTitle, Industry,
> LocationState, VendorID
> FROM VendorJobs
> WHERE ' . implode( ' AND ', $where );
> print_r($where);
> //Array ( [0] => VendorJobs.Industry
>
> IN(1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','35','','Array)
> )
>
Right here, print the contents of $sql. That is the most important thing to
know right now.
> $result = mysql_query($sql) or die ("Query failed: "
> .mysql_error());
> while($row = mysql_fetch_assoc($result))
> ?>
>
> Stuart
>
--
Jim Kaufman
Linux Evangelist
public key 0x6D802619
---
A dog teaches a boy fidelity, perseverance, and to turn around three
times before lying down.
-- Robert Benchley