Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statement help

Status
Not open for further replies.

paublo

ISP
Sep 14, 2006
127
US
Hi i have a query below that checks if the variable %d equals the domain virttest1.xxxxxxx.net and works just fine however i can't seem to figure out how to check to see if %d equals virttest1.xxxxxxx.net OR virttest2.xxxxxxx.net OR virttest3.xxxxxxx.net etc and then is if does carry on by passing the values as userdb_mail_plugins.

password_query = SELECT username as user, password, if('%d'='virttest1.xxxxxxx.net', 'quota imap_quota trash expire autocreate acl imap_acl',null) as userdb_mail_plugins


thanks, Paul
 
change this --

if('%d'='virttest1.xxxxxxx.net', ...

to this --

if('%d' IN ('virttest1.xxxxxxx.net'
,'virttest2.xxxxxxx.net'
,'virttest3.xxxxxxx.net'), ...

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
R937,


thank you very much that worked out perfect!

paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top