Hello all,
I made 2 quries in 2 different tables.
What I want is to loop all values of one of my result and look if somewhere there is the same value in the second table result and get this row to compare.
example:
$result = mysql_query(sqlstmt);
$result2 = mysql_query(sqlstmt2);
while ($arr=mysql_fetch_array($result))
{
/*Here I need to look for a specific filed value in $result 2*/
if($arr['name'] exsists in $result2)
fetch_row in $result2
}
of course dont mind the syntax, its just to get my idea crossed.
Thanks
mysql_seel_data question
Moderator: General Moderators
more explanation
what I mean is:
assuming I return a mysql result set from an SQL query, with multiple
rows of:
field1, field2, field3
is it possible to use something like mysql_data_seek, but set the
pointer based on a specific text value of a field,
as opposed to specifying a row number?
assuming I return a mysql result set from an SQL query, with multiple
rows of:
field1, field2, field3
is it possible to use something like mysql_data_seek, but set the
pointer based on a specific text value of a field,
as opposed to specifying a row number?
probably you can let mysql do the work for you.
take a look at http://www.mysql.com/doc/en/JOIN.html
and create a join-query that returns the records having matching fields
take a look at http://www.mysql.com/doc/en/JOIN.html
and create a join-query that returns the records having matching fields