PDA

View Full Version : Selecting data in rows


startech
07-02-2003, 05:06 PM
Hi!,

I am trying to select some data in a column but can't seem to figure it out.

the table name is "Parameters"
I want to be able to just select the "catch_addr" from the value column so all i get is the email address for the id of 33

mysql> select * from Parameters where id = 33;
+----+---------------+--------------------------------------+
| id | parameter | value |
+----+---------------+--------------------------------------+
| 33 | bounce_mess | This address no longer accepts mail. |
| 33 | catch_addr | some@email.com |
| 33 | nonexist_mail | catch |
+----+---------------+--------------------------------------+
3 rows in set (0.00 sec)


Any help will be appreciated!

Spookster
07-02-2003, 05:29 PM
SELECT value FROM Parameters WHERE parameter = 'catch_addr' AND id = 33;

startech
07-02-2003, 05:31 PM
That worked!

Thanks alot. :o