I keep getting Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in xx on line 6
error what is the problem with this code ? how can I fix it ?
$read = mysql_query("select * from detail");
while($wr = mysql_fetch_array($read)) {
echo $wr['Who'];
echo "<br />";
echo $wr['Time'];
echo "<br />";
echo $wr['What'];
}
edit; I made it like this still giving an error.
$db = new mysqli('localhost', 'root', '', 'panel');
$sql = "select * from detail";
$read = $db->query($sql);
while($wr = mysql_fetch_array($read)) {
echo $wr['Who'];
echo "<br />";
echo $wr['Time'];
echo "<br />";
echo $wr['What'];
}