Solved

String delimeter mysql on centos linux

Posted on 2007-11-18
3
364 Views
Last Modified: 2013-12-16
Hello

I have a centos linux installation I think I am having trouble with the os or mysql and the string delimeter, when I can't seem to execute a query that has a string parameter in it, maybe it is a syntax issue

I have tried the following
Select * from users where surname = 'jones'
and
Select * from users where surname = "jones"

I am getting a 1054 error from MySQL unknown column in field list

I can execute a sql query without the where clause successfully and if I put a none string datatype in the where clause seems to execute fine as well.

I have noticed something weird about my centos install anyway in that I need to press the ' key twice fro the character to appear, also " has the same odd behaviour, do I have my system on the wrong encoding.

I am going to try a different keyboard see if it makes a difference

Thanks

Jake
0
Comment
Question by:elschott
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
nizsmo earned 500 total points
ID: 20309760
is your column 'surname' defined in your table users? are they the right case?
0
 

Author Comment

by:elschott
ID: 20309790
for future reference

I changed keyboard made no difference

my keyboard was set to english International that is why when I press the string delimeter I had to press it twice to get the desired effect

when I changed this to english us my keyboard worked as one would expect and now my sql works as one would expect so I think problem solved you may as well have the points nizsmo as I don't know how to close this thread if I worked it out myself

Thanks

Jake
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20309798
ah some useful information there thank you for sharing. normally your above error is caused by referencing to an undefined column(field) name in your sql statement, but in your case it is otherwise. thanks for sharing.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now