Feeds:
Posts
Comments

Posts Tagged ‘Database’

The simplest way of selecting random rows from the MySQL database is to use “ORDER BY RAND()” clause in the query.
Solution 1 [SQL QUERY]
SELECT * FROM `table` ORDER BY RAND() LIMIT 0,4;
This query select 4 random value every refresh?
The problem with this method is that it is very slow. The reason for it being so [...]

Read Full Post »

XMLToArray Generator Class

Here is a PHP class that read xml file and make an array. First save this class file as xmltoarray.php and then create an object like new XmlToArray($xml_data). Finally just call createArray() function. It will be helpful when we don’t want to use database or any kind of web services. Bellow i have given full [...]

Read Full Post »