lunes, 15 de agosto de 2022

use this for create an user on MYSQL 8

 CREATE DATABASE IF NOT EXISTS android

CREATE USER 'user'@'localhost' IDENTIFIED BY 'P@ssW0rd';

GRANT ALL ON *.* TO 'user'@'localhost';

FLUSH PRIVILEGES;


domingo, 17 de abril de 2022

Order a MySQL table by two columns

 


Default sorting is ascending, you need to add the keyword DESC to both your orders:

ORDER BY article_rating DESC, article_time DESC

https://stackoverflow.com/questions/514943/order-a-mysql-table-by-two-columns

$query = " select * from  users where price like '%$_GET[par]%' or  info like '%$_GET[par]%' or keyword  like '%$_GET[par]%' order by price,  id desc";