Good, I have the following problem, that I have a social network where people can post things and send messages, the thing is that by doing select
of all publications and show them the order by UNIX_TIMESTAMP (data) DESC
does not work, I do not order them, the funny thing is that I managed to do it but with another BBDD, which coincidentally I can not find.
BBDD:
CREATE TABLE IF NOT EXISTS 'publicacions' (
'id' int(11) NOT NULL AUTO_INCREMENT,
'contingut' text NOT NULL,
'usuari' int(11) NOT NULL,
'imagen' varchar(255) DEFAULT NULL,
'data' datetime NOT NULL
SQL:
$sql = "select usuaris.nom, usuaris.cognom, publicacions.contingut from usuaris, publicacions where usuaris.id = publicacions.usuari order by UNIX_TIMESTAMP (data) DESC;";