This is a discussion on Re: [AMaViS-user] sql_select_white_black_list question... within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Never mind. I was able to craft a sql query that solved my needs. is there any reason that ? only ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Never mind. I was able to craft a sql query that solved my needs. is there any reason that ? only gets expanded once ? On Thu, 19 Jan 2006, Joseph W. Breu wrote: > > I am trying to execute the following query: > > set @rid=?; > > (select wb FROM > cfu_email.amavis_wblist,cfu_email.amavis_mailaddr > WHERE (rid=@rid) AND > (sid=cfu_email.amavis_mailaddr.id) AND > (cfu_email.amavis_mailaddr.email IN (%k)) > ORDER BY cfu_email.amavis_mailaddr.priority > DESC) UNION (select "w" as wb from > horde_config.turba_objects where > horde_config.turba_objects.object_email in > (%k) and horde_config.turba_objects.owner_id > in (select email from cfu_email.users where > id = @rid)) > > I need to query 2 database tables for > information on whitelisting users that are > found in a whitelist/blacklist table and also > in an address book. Unfortunately, I can't > get the id passed to the query twice (in this > case, id=40). > > Is there a simpler way to accomplish this > other than rebuilding the apps to store > everything in a single table? > > > -- Thanks, --------------------------------------------------------- Joseph W. Breu, CCNA phone : +1.319.268.5228 Senior Network Administrator fax : +1.319.266.8158 Cedar Falls Utilities cell : +1.319.493.1686 support: +1.319.268.5221 url : http://www.cfu.net ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=...486&dat=121642 _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|