This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 24183
    
  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('');
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unknown column 'mkl' in 'field list
 
Similar Threads
how will we move from one page to another within the same window in Swing?
swing with mysql connection1
Problem With GUI of Net Beans
retrieving database data to textarea
Pressing a button to open a new window