Solved

String delimeter mysql on centos linux

Posted on 2007-11-18
3
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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