$grabContribs = "SELECT answers.user, answers.answer, answers.qID, answers.date, user_question.question, user_question.id, user_question.make, user_question.model
FROM answers
LEFT JOIN user_question ON answers.qID = user_question.id
WHERE answers.user = '" . $_SESSION['username'] . "'
GROUP BY date
UNION
SELECT how_to.user, how_to.howto, how_to.id, how_to.NULL, how_to.date, how_to.question, how_to.viewable, how_to.make, how_to.model
WHERE how_to.user = '" . $_SESSION['username'] . "'
GROUP BY date";
$contribsGrabbed = mysql_query($grabContribs) or die("Grab did not work because: " . mysql_error());
while($c = mysql_fetch_array($contribsGrabbed)) {
|