Re: [PHP] Search Query on two tables not working (RESOLVED)

2009-07-21 Thread Miller, Terion
Yep, sure was the spacesOMG...will I ever get it... On 7/21/09 12:29 PM, "Ashley Sheridan" wrote: On Tue, 2009-07-21 at 13:24 -0400, Andrew Ballard wrote: > On Tue, Jul 21, 2009 at 1:20 PM, Miller, > Terion wrote: > > Here it is...I see where it's doing the restaurant.name LIKE statement 2x

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 13:24 -0400, Andrew Ballard wrote: > On Tue, Jul 21, 2009 at 1:20 PM, Miller, > Terion wrote: > > Here it is...I see where it's doing the restaurant.name LIKE statement 2x > > which is prob messing it up right...but in the code why is it doing that > > twice.. > > > > SELECT

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect to > restaurants.php$sql = "SELECT name, address, inDate, in

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Andrew Ballard
On Tue, Jul 21, 2009 at 1:20 PM, Miller, Terion wrote: > Here it is...I see where it's doing the restaurant.name LIKE statement 2x > which is prob messing it up right...but in the code why is it doing that > twice.. > > SELECT name, address, inDate, inType, notes, critical, cviolations, > noncri

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 10:07 -0700, Miller, Terion wrote: > > > On 7/21/09 12:04 PM, "Ashley Sheridan" wrote: > > On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > > > Why isn't this working for searching? > > > > // Run query on

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Here it is...I see where it's doing the restaurant.name LIKE statement 2x which is prob messing it up right...but in the code why is it doing that twice.. SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspections WHERE restaurants.name <> '' AN

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
On Tue, Jul 21, 2009 at 12:41 PM, Miller, Terion < tmil...@springfi.gannett.com> wrote: > Turned off the redirects on the whole script and tried to the the query to > echo and these are the errors I got: > > Notice: Undefined offset: 1 in /var/www/vhosts/ > getpublished.news-leader.com/httpdocs/Re

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Turned off the redirects on the whole script and tried to the the query to echo and these are the errors I got: Notice: Undefined offset: 1 in /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/processRestaurantSearch.php on line 89 Warning: mysql_fetch_array(): supplie

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
On 7/21/09 12:04 PM, "Ashley Sheridan" wrote: On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect to > restaurants.php

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
On 7/21/09 11:47 AM, "Dan Shirah" wrote: Why isn't this working for searching? // Run query on submitted values. Store results in $SESSION and redirect to restaurants.php$sql = "SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspe

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
> > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect > to restaurants.php$sql = "SELECT name, address, inDate, inType, > notes, critical, cviolations, noncritical FROM restaurants, inspections > WHERE restaurants.name <> ''

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Andrew Ballard
On Tue, Jul 21, 2009 at 12:26 PM, Miller, Terion wrote: > Why isn't this working for searching? Check your concatenation in the query. You need some white space padding your SQL segments, otherwise the text all starts to run together. (I had to reformat it. For some reason, most of the code snip

[PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Why isn't this working for searching? // Run query on submitted values. Store results in $SESSION and redirect to restaurants.php$sql = "SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspections WHERE restaurants.name <> '' AND rest