|
-
Jun 6th, 2002, 08:25 AM
#1
Thread Starter
Hyperactive Member
SQL inside SQL
In this code :
$Sql = "select * from Subject where UserID>=1";
$Result = mysql_query($Sql);
while ($Row = mysql_fetch_array($Result))
{
$UserName="$Row[UserName]";
$Sql = "select * from Members where UserName=$UserName";
$Result = mysql_query($Sql);
while ($Row = mysql_fetch_array($Result))
{
echo "$Row[HomePage]";
}
}
I try to run SQL inside SQL But it give me an error !!!
the problem that I have 2 table (Subject and Members) and I want to get UserName(s) from
Subject table and after that get the homepage of those username(s) from Members Table and echo them.
How can I do that ???
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|