Re: Nested MySQL Query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux