Re: Syntax frustration On Jan 31, 3:30 pm, "Captain Paralytic" <paul_laut...@yahoo.com>
wrote:
> On 31 Jan, 14:06, "Dan" <dp_pea...@hotmail.com> wrote:
>
>
>
> > I'm getting a syntax complaint with the following query
>
> > SELECT documents.DocPassportFirstName,
> > documents.DocPassportFamilyName,
> > countries.ConNationality,
> > documents.DocPassportNo,
> > documents.DocPassportIssueDate,
> > documents.DocPassportPlaceOfIssue,
> > documents.DocPassportExpiryDate,
> > documents.DocDLFirstName,
> > documents.DocDLFamalyName,
> > documents.DocDLNationality,
> > documents.DocDLNo,
> > documents.DocBdcWith,
> > documents.DocBdcPolNo,
> > documents.DocBdcTelNo,
> > documents.DocBdcExpiryDate,
> > documents.DocMOTDue,
> > documents.DocCCP,
> > documents.DocCCPPolNo,
> > documents.DocCCPTelNo,
> > documents.DocUpDate
> > FROM documents, countries
> > WHERE documents.DocPassportNationalty = countries.ConID
> > AND MemberID = $memberid;
>
> > MySQL 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 '' at line 1
>
> > I can't see what is wrong with it! Can anyone else see my mistake?
>
> I tried pasting it into phpMyAdmin and all it said to me was that the
> tables didn't exist. No SQL error was posted.
I suspect the error is in the contents of $memberid - but without
seeing the echoed query it's difficult to tell. |