I'm using this code:
<php?
$sql = mysql_query("SELECT 'id', 'detail', 'time' FROM 'news' ORDER BY 'time' DESC LIMIT 5");
$return = mysql_fetch_assoc($sql);
while($row = $return) { ?>
Data: <?php echo date("d/m/Y", $row['time']); ?> |
Noticia: <?php echo $row['detail']; } ?>
And when I run this code, the page loads and does not return the database information.
Database:
The connection to the database is on another page, I used require();
to get the connection.
Connection:
<?php error_reporting(0); $mysql = mysql_connect('localhost', 'root', ''); mysql_select_db('central');
And the page only loads and returns nothing.
Thank you des de already!