jeliot Posted April 1, 2006 Share Posted April 1, 2006 Newbie questionwhen the SQL error says line on does that mean line of the whole HTML/PHP script or just the first line of the actuall php script in the HTML scriptthanks Quote Link to comment Share on other sites More sharing options...
Barand Posted April 1, 2006 Share Posted April 1, 2006 It means the first line of the SQL queryIf 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 Link to comment Share on other sites More sharing options...
jeliot Posted April 1, 2006 Author Share Posted April 1, 2006 [!--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 queryIf 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.