This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes Unknown column 'mkl' in 'field list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Unknown column Watch "Unknown column New topic
Author

Unknown column 'mkl' in 'field list

Tapan Prajapati
Greenhorn

Joined: Mar 05, 2010
Posts: 27



i get an error : unknown column in 'xx' in field list when i run it and entered the text in text field the value displayed in ' ' and i used net bean . javascript:emoticon('');
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Your SQL syntax is wrong; the string has to be in single quotes. But you should never, never do this, as you're opening the door to a SQL injection attack (Google that to learn about it if you don't know what it is.) Instead, you should just do this:





[Jess in Action][AskingGoodQuestions]
Tapan Prajapati
Greenhorn

Joined: Mar 05, 2010
Posts: 27
Ernest Friedman-Hill wrote:Your SQL syntax is wrong; the string has to be in single quotes. But you should never, never do this, as you're opening the door to a SQL injection attack (Google that to learn about it if you don't know what it is.) Instead, you should just do this:






Thanks a lot.! its work.!


javascript:emoticon('');
 
jQuery in Action, 2nd edition
 
subject: Unknown column 'mkl' in 'field list