| |||||||||||||||||||||||||||||||
|
> > Before you get mad, here is how a way to solev your problem: > > query = SELECT CONCAT('smtp:', next) FROM smtproutes where > domain = '%d' and %u = IF(account = '', %u, account) silly me, this is the same as OR. don't use it. use this: > > > query = SELECT CONCAT('smtp:', next) FROM smtproutes where > domain = '%d' and > (acount = '%u' or account = '') > order by length(account) desc limit 1 an approach that doesn't require "advanced" sql statements is: transport_maps = proxy:mysql:/path/to/transport_users.cf proxy:mysql:/path/to/transport_domains.cf in transport_users, use the query with '%u' = account in transport_domains, use the same query but with '%u' = ''
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com