Thursday, December 8, 2011

Sunday, December 4, 2011

grant access to an ip of my DB

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'

sql random row generate

The simplest way of selecting random rows from the MySQL database is to use "ORDER BY RAND()" clause in the query. Solution 1 [SQL] SELECT * FROM `table` ORDER BY RAND() LIMIT 0,1;