Re: Please help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Okay, I was under the impression that "where" is
implied inthe joins xx.xx = xx.xx .  Is that not the
case ?
As a matter of fact, there isn't even a where or like
in my query.  Then again myabe that's why I can see
*all* records but not run a search.  

Can you please provide an exmample of the column name
bteween where and like ?

Thank you.
Stuart


--- Micah Stevens <micah@xxxxxxxxxxxxxxxxxx> wrote:

> 
> If you look at the query, there's no column name
> between 'WHERE' and 'LIKE' 
> which is a syntax error. That's the problem.
> 
> 
> Looks like your sql generator has some issues, or
> you didn't specify the WHERE 
> column properly. I'm not familiar with the system
> you're using, but keep in 
> mind, that mysql_error will usually not steer you
> wrong. 
> 
> -Micah 
> 
> On Friday 10 September 2004 10:03 am, Stuart
> Felenstein wrote:
> > I had not, my apologies.  I think your post
> slipped
> > by.  Anyway, yes I have now inserted mysql_error()
> and
> > got my return.  Though I'm not entirely sure how
> to
> > fix it.
> > Here is the error.
> >
> > You have an error in your SQL syntax. Check the
> manual
> > that corresponds to your MySQL server version for
> the
> > right syntax to use near 'Like 'ACCFIN'' at line 1
> > SELECT `VendorJobs`.`JobID`,
> > `VendorSignUp`.`CompanyName`,
> > `StaIndTypes`.`CareerCategories`,
> > `StaUSCities`.`City`, `USStates`.`States`,
> > `VendorJobs`.`AreaCode`, `staTaxTerm`.`TaxTerm`,
> > `VendorJobs`.`PayRate`,
> `staTravelReq`.`TravelReq`,
> > `VendorJobDetails`.`Details`,
> > `VendorJobs`.`PostStart`, `VendorJobs`.`JobTitle`
> FROM
> > `VendorJobs` INNER JOIN `VendorSignUp` ON
> > (`VendorJobs`.`VendorID` =
> `VendorSignUp`.`VendorID`)
> > INNER JOIN `StaIndTypes` ON
> (`VendorJobs`.`Industry` =
> > `StaIndTypes`.`CareerIDs`) LEFT OUTER JOIN
> > `StaUSCities` ON (`VendorJobs`.`LocationCity` =
> > `StaUSCities`.`CityID`) LEFT OUTER JOIN `USStates`
> ON
> > (`VendorJobs`.`LocationState` =
> `USStates`.`StateID`)
> > LEFT OUTER JOIN `staTaxTerm` ON
> > (`VendorJobs`.`TaxTerm` =
> `staTaxTerm`.`TaxTermID`)
> > INNER JOIN `staTravelReq` ON
> (`VendorJobs`.`TravelReq`
> > = `staTravelReq`.`TravelReqID`) INNER JOIN
> > `VendorJobDetails` ON (`VendorJobs`.`JobID` =
> > `VendorJobDetails`.`JobID`) where Like 'ACCFIN'
> limit
> > 0,1
> >
> > --------------------------------------------------
> >
> > --- Micah Stevens <micah@xxxxxxxxxxxxxxxxxx>
> wrote:
> > > did you make the change to the code I suggested?
> > > What does MySQL say the error
> > > is?
> > >
> > > -Micah
> > >
> > >
> > > On Friday 10 September 2004 07:49 am, Stuart
> > >
> > > Felenstein wrote:
> > > > As I said this is a code generator
> (dbqwiksite).
> > >
> > > So,
> > >
> > > > describing the process for creating the code
> is
> > > > different.  The $sql is fine, as far as typos
> or
> > > > incorrect characterrs.  I've gone through
> those
> > > > statement very carefully.
> > > > I've also tried to run a debug with no luck.
> > > > But I do know that there is something wrong
> with
> > >
> > > the
> > >
> > > > statement, since I can get a complete display
> of
> > >
> > > all
> > >
> > > > records, but can't search using criteria.
> > > >
> > > > Below is the $sql, one I know works , though
> I've
> > > > tried others.  VendorJobs is the table I'm
> > >
> > > querying ,
> > >
> > > > and since it's made up of values from other
> static
> > > > type tables I have all the joins in place.
> > > >
> > > > I've also taken the tick marks out, thinking
> maybe
> > >
> > > it
> > >
> > > > was a style issue.  I'm not sure where to go
> with
> > >
> > > it.
> > >
> > > > Getting a response from the company is like
> pretty
> > > > difficult.
> > > >
> > > >   `VendorJobs`.`JobID`,
> > > >   `VendorSignUp`.`CompanyName`,
> > > >   `StaIndTypes`.`CareerCategories`,
> > > >   `StaUSCities`.`City`,
> > > >   `USStates`.`States`,
> > > >   `VendorJobs`.`AreaCode`,
> > > >   `staTaxTerm`.`TaxTerm`,
> > > >   `VendorJobs`.`PayRate`,
> > > >   `staTravelReq`.`TravelReq`,
> > > >   `VendorJobDetails`.`Details`,
> > > >   `VendorJobs`.`PostStart`,
> > > >   `VendorJobs`.`JobTitle`
> > > > FROM
> > > >   `VendorJobs`
> > > >   INNER JOIN `VendorSignUp` ON
> > > > (`VendorJobs`.`VendorID` =
> > >
> > > `VendorSignUp`.`VendorID`)
> > >
> > > >   INNER JOIN `StaIndTypes` ON
> > >
> > > (`VendorJobs`.`Industry`
> > >
> > > > = `StaIndTypes`.`CareerIDs`)
> > > >   LEFT OUTER JOIN `StaUSCities` ON
> > > > (`VendorJobs`.`LocationCity` =
> > >
> > > `StaUSCities`.`CityID`)
> > >
> > > >   LEFT OUTER JOIN `USStates` ON
> > > > (`VendorJobs`.`LocationState` =
> > >
> > > `USStates`.`StateID`)
> > >
> > > >   LEFT OUTER JOIN `staTaxTerm` ON
> > > > (`VendorJobs`.`TaxTerm` =
> > >
> > > `staTaxTerm`.`TaxTermID`)
> > >
> > > >   INNER JOIN `staTravelReq` ON
> > > > (`VendorJobs`.`TravelReq` =
> > > > `staTravelReq`.`TravelReqID`)
> > > >   INNER JOIN `VendorJobDetails` ON
> > > > (`VendorJobs`.`JobID` =
> > >
> > > `VendorJobDetails`.`JobID`)
> > >
> > > > Stuart
> > > >
> > > > --- Philip Thompson <prthomp@xxxxxxxx> wrote:
> > > > > I think everyone knows that $sql is a
> statement.
> > >
> > > But
> > >
> > > > > what people are
> > > > > asking is: what is that statement?! Because
> if
> > >
> > > there
> > >
> > > > > are "incorrect"
> > > > > characters or 's in that statement, then
> that
> > >
> > > can
> > >
> > > > > break your
> > > > > code/statement.
> > > > >
> > > > > ~Philip
> > > > >
> > > > > On Sep 9, 2004, at 5:49 PM, Stuart
> Felenstein
> > >
> 
=== message truncated ===

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux