NYCPHP Meetup

NYPHP.org

[nycphp-talk] MYSQL SELECT Error Question

David Rydell drydell at worldnet.att.net
Fri Feb 28 14:41:39 EST 2003


as the other posters have pointed out, Service needs to be in quotes... but
that's only half the problem. To get the results you really want (rows which
contain the word Service in Business_Type), use LIKE with wildcards:

mysql> select * from Members where Business_Type like '%Service%';


-----Original Message-----
From: Steve Soler [mailto:steve at soler.com]
Sent: Thursday, February 27, 2003 9:48 PM
To: NYPHP Talk
Subject: [nycphp-talk] MYSQL SELECT Error Question


Can anyone help me decipher this error I'm getting in MYSQL?
I'm certain there are rows in my database that contain the word
"Service" in the "Business_Type" column.

Below is the Select command and the error I'm getting. It's copied
right of my Telnet program.

mysql> select * from Members where Business_Type = Service;
ERROR 2000: Unknown column 'Service' in 'where clause'


Thanks in advance,
- Steve



--- Unsubscribe at http://nyphp.org/list/ ---



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003




More information about the talk mailing list