I am trying to return a recordSet of 2 mysql_query’s - is this possible?
This is what I am trying but it doesn’t work as I would like.

$table = 'revision_1';
$card_stack = 1;
$cardStyle = 'revision';
$studentID = 642653;
$result = mysql_query("SELECT DISTINCT card_type FROM $table WHERE student_id = '$studentID'");
$columnValues = array();

while($row = mysql_fetch_assoc($result)){
	$columnValues[] = $row['card_type'];
$numResults = sizeof($columnValues);
for($i=0; $i < $numResults; $i++) {
	$recordSet = mysql_query("SELECT * FROM $table t INNER JOIN $columnValues[$i] v ON t.card_id = WHERE t.student_id = '$studentID' AND t.lesson = '$card_stack'");			
return $recordSet;

Any help would be greatly appreciated.


Basically I want to merge multiple recordSets but don’t know if this is possible.
I guess I could create a temp table and insert all the records into this then retrieve 1 recordSet of that table?

Any suggestions about my course of action?

I think you can use $recordSet as an array.