Feeds:
Posts
Comments

Posts Tagged ‘function’

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 »

Sometimes we need to display date in different format as user requirements. Here some PHP user define date function i have used. I think it will be helpful for PHP professionals. As you can see in my all example there are tons of different formats that can be used in the date feature.
<?php
/**
* mysql::cDateMySQL2Br()
* convert [...]

Read Full Post »