I finally got the query to work after an hour or two of messing with it / research! Now I have it echoing the question and first choice, but how do I access choice 2 (I have 2 choices in the choice table, both with pollid as 1.) This works, but does it look right? I just feel weird fetching an array inside of an array.
PHP Code:
$qry = 'SELECT * FROM polls
INNER JOIN choices ON polls.id = choices.pollid
WHERE polls.userid = 1000';
$result = mysql_query($qry, $connection);
if($result === FALSE)
{
die(mysql_error());
}
while($row = mysql_fetch_array($result))
{
echo $row['question'];
echo $row['choice'];
while($row = mysql_fetch_array($result))
{
echo $row['choice'];
}
}
/////////////////////////////////////////////////////////////////////
EDIT x12312 :
Nevermind I figured it out, so far!