CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 MySql error message "Invalid SQL: select ..."

Print topic Send  topic

Author Message
Lennon
Posted: 11/21/2002, 11:54 AM

I'm new with CC and php
I get this error in my browser window when executing my php script, can someone help?

Database error: Invalid SQL: select j.ID as j_ID, j.fname as j_fname, j.lname as j_lname, j.profile as j_profile, j.state as j_state, j.username as j_username from join j
MySQL Error: 1064 (You have an error in your SQL syntax near 'join j ' at line 1)
Session halted.
Andrew B
Posted: 11/25/2002, 12:47 PM

Don't know why it would generate invalid sql, but it has. Standard sql goes something like this (insert yer own music here)

SELECT <field list> FROM <tablename> JOIN <tablename>

Each tablename can be followed by an alias, such as 'J'

Now, my question to you is this : Did you name your table 'join'? Join is a reserved word, so you can't use it as a table name. You can use it as a field name, but you really should not. If so, change the name and everything should work fine.
Mario
Posted: 02/13/2003, 6:35 AM

I see you name you table as "Join"... It's a poor, but not is deathly :))) MySQL can eat it if you use enclosing table name in ` chars... but CSS don't know about this......

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.