You can do:
SELECT last_name, first_name, phone, if(pub_email=Y,email,) as email
FROM `mydatabasetable` WHERE `current_member` = Y AND `pub_name` = Y
ORDER BY last_name ASC
Gracias, Carlos. This worked fine!
---Fritz
--
MySQL General Mailing List
For list archives:
De-lurking here.
I am trying to figure out how to return results from a query. What I need to do
is to return 4 columns from a database. This is easy:
SELECT last_name, first_name, phone, email FROM `mydatabasetable` WHERE
`current_member` = Y AND `pub_name` = Y ORDER BY last_name ASC
This
Hi, I have MySQL 3.23.49 and I access the mysql with :
% mysql -u user -p
Enter password:***
and type :
mysql use user's_database;
and returns :
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database