$sqlQuery1 = "SELECT id FROM table1"; $result1 = mysql_query($sqlQuery1) or die(mysql_error()); $row1 = mysql_fetch_array($result1);