Hi,
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 = v.id WHERE t.student_id = '$studentID' AND t.lesson = '$card_stack'");
}
return $recordSet;
Any help would be greatly appreciated.
Thanks