Jump to content

SQL syntax error line 1


jeliot

Recommended Posts

It means the first line of the SQL query

If you put the query all on one line then the error, if there is one, wil always be on line 1.

[code]SELECT a.cola, b.colb, b.colc FROM table1 a INNER JOIN table2 b ON a.cola = b.cola WHERE b.colc = '$x' AND b.colx = 42[/code]

or you could split it over several lines

[code]SELECT a.cola, b.colb, b.colc
FROM table1 a
        INNER JOIN table2 b ON a.cola = b.cola
WHERE b.colc = '$x'
        AND b.colx = 42[/code]
Link to comment
Share on other sites

[!--quoteo(post=360686:date=Apr 1 2006, 03:13 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Apr 1 2006, 03:13 PM) [snapback]360686[/snapback][/div][div class=\'quotemain\'][!--quotec--]
It means the first line of the SQL query

If you put the query all on one line then the error, if there is one, wil always be on line 1.

[code]SELECT a.cola, b.colb, b.colc FROM table1 a INNER JOIN table2 b ON a.cola = b.cola WHERE b.colc = '$x' AND b.colx = 42[/code]

or you could split it over several lines

[code]SELECT a.cola, b.colb, b.colc
FROM table1 a
        INNER JOIN table2 b ON a.cola = b.cola
WHERE b.colc = '$x'
        AND b.colx = 42[/code]
[/quote]


thanks atleast i have a starting point to find the problem
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.