Link to home
Start Free TrialLog in
Avatar of elschott
elschott

asked on

String delimeter mysql on centos linux

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
ASKER CERTIFIED SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of elschott
elschott

ASKER

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
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.