On 6 Aug 2003 at 12:04, Zach wrote:

> I'm trying to use a select statement for a table that uses numbers for
> the field names. Here is the query I've been trying. Please help!
> 
> SELECT * FROM table_name WHERE '18'=1; (18 is the field name, 1
> obviously is the value I'm looking for.)

If it's a column name, you should enclose it with ` (backtick), not ' 
(single quote).  Single quotes are for strings, and the string '18' 
is never going to equal 1.

And tell whoever designed the table that using numbers for column 
names is a remarkably bad idea (unless of course it's your boss).

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to