hey guys,
I’m not understanding this one. I have this code:
$sql = mysqli_query($conn, "post_date, post_title, post_status FROM " . $dbName . " ORDER BY post_date ASC");
and further down the code, I attempt to echo it out like this:
while($row = mysqli_fetch_row($sql)) {
echo '<tr>';
foreach ($row as $key => $col) {
echo "<td>$col</td>";
}
echo '</tr>';
}
and I’m getting this error: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given
but if I run that same code on data that comes from 5 columns from a different database and table instead of 3 from this db and table, it prints out just fine. Why is this? thanks!