On Sat, 2 Jun 2001, Jens Luedicke wrote:
> I'm using MySQL through the Perl DBI and I want to merge
> two SQL statements that would simplify my code:
>
> 1. SELECT * FROM filters WHERE folder != '$folder'
> 2. SELECT * FROM mails WHERE folder_name = '$folder' AND x$filters->{type} LIKE
>'%$filters->{pattern}%'
>
> for each of the results of the first statement the second statement is called
> and based on the new results further actions are taken.
>
> How can I merge them?
>
This would be what's called a subselect, and MySQL doesn't support them
yet.
***********************************************************************
Gallons of oil per day that the proposed drilling of Alaska's Arctic
National Wildlife Refuge is projected to yield: 42,000,000
Gallons by which daily U.S. oil consumption would drop if SUVs' average
fuel efficiency increased by 3 mpg: 49,000,000
***********************************************************************
_ Patrick Goetz
_| ~-. Dept. of Mathematics
\, *_} The University of Texas at Austin [EMAIL PROTECTED]
\( Austin, Texas 78712-1084 Phone: (512) 232-2746
http://www.ma.utexas.edu/users/pgoetz
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php