View Full Version : Can a recordset Pull info from another recordset for a Query?

11-16-2009, 09:55 PM
Can you pull info for filtering a recordset from a seperate recordset, for example

$query_Recordset2 = "SELECT * FROM comm WHERE comm = '<$row_Recordset1['ID']; ?>'";

if so what is the correct way to write this. The above is just an example and it doesn't work. Or does it have to be the same record set?

11-17-2009, 01:54 AM
well 1 would get the 1st value <$row_Recordset1['ID']; ?> and make a variablewhich would be $ com= $row_Recordset1['ID'];
you can not code as you have any way so it would read
$query_Recordset2 = "SELECT * FROM comm WHERE comm = $com";
but just to check the table and column are both called comm?