lo que nos dejaria algo like this...
?php include ('config.php'); ?>
<?PHP
if ($db_found) {
$result = "mysql_query(SELECT * FROM chat ORDER BY id DESC limit 1)";
while ($db_field = mysql_fetch_assoc($result)) {
print "<th class=\"spawn-mensaje\">" . $db_field['idcomentario'] . "</th>";
}
mysql_close($db_handle);
} else {
print "Problemas al intentar leer la base de datos, intentalo mas tarde disculpa las molestias. ";
mysql_close($db_handle);
}
?>
con eso me dice
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in C:\xampp\htdocs\web2\mods\com\totalcomentarios.php on line 7
)
?php include ('config.php'); ?>
<?PHP
if ($db_found) {
$result = "mysql_query(SELECT * FROM chat ORDER BY id DESC limit 1)";
while ($db_field = mysql_fetch_assoc($result)) {
print "<th class=\"spawn-mensaje\">" . $db_field['idcomentario'] . "</th>";
}
mysql_close($db_handle);
} else {
print "Problemas al intentar leer la base de datos, intentalo mas tarde disculpa las molestias. ";
mysql_close($db_handle);
}
?>
con eso me dice
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in C:\xampp\htdocs\web2\mods\com\totalcomentarios.php on line 7
)