I have a table where I keep the post of a forum I did with PHP and Mysql:
CREATE TABLE 'sala_muro_temas' (
'Id' int(11) NOT NULL AUTO_INCREMENT,
'categoria' int(11) DEFAULT NULL,
'id_clase' bigint(20) DEFAULT NULL,
'id_autor' bigint(20) unsigned NOT NULL DEFAULT '0',
'autor' varchar(100) DEFAULT NULL,
'titulo' text,
'descripcion' text,
'imagenes' int(2) DEFAULT NULL,
'fecha' varchar(10) DEFAULT NULL,
'last_update' varchar(10) DEFAULT NULL,
'borrado' varchar(1) NOT NULL DEFAULT '',
'sala' varchar(32) DEFAULT NULL,
'ejercicio' tinyint(1) DEFAULT NULL,
PRIMARY KEY ('Id')
)
Now I want to add the function so that you can post the posts that the user chooses above all and that are displayed first. To do this I have created a table where I save the id of the user and the id of the posted post:
CREATE TABLE 'sala_muro_temas_fijados' (
'id_usuario' bigint(1) DEFAULT NULL,
'id_tema' int(11) DEFAULT NULL
)
My question is how I perform the SQL query so that the posts saved by the user are displayed first and then the rest. I hope you can guide me. Thanks !!