oqqkukrlcn
New Member
the following mysql query is only returning a single row when it should be returning 4.\[code\]$query = "SELECT * FROM questions"; $result = mysql_query($query) or die("ERROR: $query.".mysql_error()); // if records are present if (mysql_num_rows($result) > 0) { while ( $row = mysql_fetch_object($result) ){ // get question ID and title $qid = $row->qid; echo '<div id=ques>'; echo '<h2>'.$row->qtitle .'</h2>'; echo '</div>'; print_r ($row);\[/code\]the print_r function displays this:\[code\]stdClass Object ( [qtitle] => dummy text here [qid] => 1 )\[/code\]