This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes SQL syntax error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "SQL syntax error" Watch "SQL syntax error" New topic

SQL syntax error

Donna Harrington
Ranch Hand

Joined: Aug 08, 2003
Posts: 31
Hey all,
I have a syntax error and i want to update both tables customerdetails table and order table. but my join is wrong or something. can anybody see my error. thank u!

PreparedStatement p = con.prepareStatement("INSERT INTO customerdetails JOIN order(Title,Username,Password,FirstName,Surname,Address,City,Email,TelephoneNum,cardType,cardNum,date,month,year,shipTitle,shipSurname,shipAddress,shipCity,shipCountry,shipPostalCode)"+" VALUES('"+radio+"','"+Username+"','"+Password+"','"+FirstName+"','"+Surname+"','"+Address+"','"+City+"','"+Email+"','"+telephoneNum+"','"+radio1+"','"+cardNum+"','"+date+"','"+month+"','"+year+"','"+radio2+"','"+shipName+"','"+shipSurname+"','"+shipAddress+"','"+shipCity+"','"+shipCountry+"','"+shipPostalCode+"')");
Donna Harrington
Ranch Hand

Joined: Aug 08, 2003
Posts: 31
sorry put this message in wrong place!
I agree. Here's the link:
subject: SQL syntax error
It's not a secret anymore!