|
Posted by nice.guy.nige on 07/22/07 18:58
While the city slept, newbie (mitbbsmj@yahoo.com) feverishly typed...
[...]
> $result= mysql_query(" select * from table_info where first_name =
> 'tom' ");
> $id = $result['id'];
> mysql_query(" select * from table_working_hr where id='$id' AND
> coming_date > 20 ");
>
> Can I get the result with a single query (with some advanced query
> like join )?
mysql_query("select twh.* from `table_working_hr` twh inner join
`table_info` ti on twh.id = ti.id where ti.first_name = 'tom' and
twh.coming_date > 20");
Hope that helps,
Nige
--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"
Navigation:
[Reply to this message]
|