Re: Nested MySQL Query
| From: | Mark | Date: | Tue, 18 Mar 2003 20:01:14 +0000 |
| Subject: | Re: Nested MySQL Query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26452@lists.php.net to get a copy of this message | ||
Perhaps I'm missing something, but don't you need something to link
the outer query to the nested query? Such as
SELECT * FROM Allocations WHERE Allocations.Project_ID=(SELECT
Project_ID FROM Project WHERE Project_Name = $_POST[project_name])
and if that's the case, can you do a JOIN on whatever links the
tables together?
--- shaun <shaun@mania.plus.com> wrote:
> Hi,
>
> I have just found out that I can't use nested queries with MySQL so
> could
> someone tell me how i can transform the following query for use
> with MySQL?
>
> SELECT * FROM Allocations WHERE (SELECT Project_ID FROM Project
> WHERE
> Project_Name = $_POST[project_name])
>
> thanks for your help
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
Mark Weinstock
mark_weinstock@yahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to
defend everyone else's right to the same thing.
***************************************
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com