|
|||||||||||
|
RE: [clug-support] Mysql Script
From: Justin L. Spies <jspies(at)rentalcondos.com>
Date: Sat Jan 25 2003 - 07:04:32 EST
Brian,
SELECT
IF(hideinfo = 'N', Address, '') AS Address, IF(hideinfo = 'N', City, '') AS City, IF(hideinfo = 'N', State, '') AS State, IF(hideinfo = 'N', Zip, '') AS Zip, hideinfo FROM psh_alumni WHERE State = 'colname';
Note that this is, as others have pointed out, not valid SQL'92 syntax and
is
while in MS-SQL Server, you would use:
For details about the immediate if command in MySQL (the IF(...)), see the
following URL:
Hope that this helps...
Sincerely,
-----Original Message-----
I am wondering if someone could look at this script and see if it is even in the right ballpark to work..
SELECT GradYr, GradLastName, GradFirstName, CurrLastName, Address, City,
`State`, Zip, hideinfo
Begin
(Address = ' ',
City = ' ',
State = ' ',
Zip = ' ' )
I AM really novice at this. But I would think something like that should work. However when I run that scrip I get an SQL syntax error. Basically I am making an alumni site that if the person wants his Address withheld then it will not show up, the only thing that will show us is his/her name and Grad Year. Can someone please help me, or point me in the right direction? TIA Brian Speck -*-*-
clug-talk -- For all general CLUG discussions clug-announce -- For announcements about upcoming CLUG eventsAnd don't forget our website: http://cleveland.lug.net/ -*-*-
clug-talk -- For all general CLUG discussions clug-announce -- For announcements about upcoming CLUG eventsAnd don't forget our website: http://cleveland.lug.net/ Received on Sat Jan 25 07:18:27 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:41:10 EDT |
||||||||||
|
|||||||||||