I have following code..
$query = "SELECT quote, author FROM quotes ORDER BY id DESC";
$resut = mysql_query($query, $connection) or die(mysql_error());
echo $result; //for debuggin purpose
while($result_set = mysql_fetch_array($result)) {
echo '<div class="pullquote">';
echo $result_set['quote'];
echo ' - ';
echo $result_set['author'];
echo '</div>';
}
and this doesn't works! The table is not empty FYI, all I see in the output is:
Resource id #9
I am not being able to figure out what this Resource id #9
means.
As I tested SELECT quote, author FROM quotes ORDER BY id DESC
in phpmyadmin, that just works fine and produces desired result, but not in here. I wonder what is wrong with the code or something?
If I do following,
$array = mysql_fetch_assoc($result);
var_dump ($array);
It returns, bool(false)
. What does that mean here?