weird problem!!!

wxdqz

New Member
hi guys,

i'm kinda new to php we'll i have one problem doing a multiple select queries.
like this:

$qry1 = mssql_query("SELECT * FROM TBL1 WHERE ID = '$ID'", $DSN);
while ($row = mssql_fetch_row($qry1))
{
$a_name = $row{"Name"};
$a_last = $row{"Lastname"};
}

$qry2 = mssql_query("SELECT * FROM TBL2 WHERE Lastname = 'PEPE'", $DSN);
while ($row = mssql_fetch_row($qry2))
{
$b_name = $row{"Name"};
$b_last = $row{"Lastname"};
}

this one just keeps looping and giving me very weird results....

any ideas?

thanks in advance,

arvin
 
Back
Top