select timediff(now(),convert_tz(now(),@@session.time_zone,’+00:00′));
Related Articles
How to Get Size of a Database in Mysql
To Get Data Base Size in MB and Free Space in MBSELECT table_schema “dbName”, sum( data_length + index_length ) / 1024 / 1024 “Data Base Size in MB”, sum( data_free )/ 1024 / 1024 “Free Space in MB”FROM information_schema.TABLESGROUP BY table_schema ; To Get Size in GB: SELECT sum(round(((data_length + index_length) / 1024 […]
PHP Mysql Visitor Counter Script
If you want to add a counter to a web page or a website then use the below simple PHP Counter Script using MySql. It is very easy to implement it and it counts whenever a page is being refreshed and the script won’t reduce page speed, unlike page counter scripts. PHP Visitor Counter Script […]
Best way to loop through a PHP mysql Resultset
If you want to loop throuh the mysql result set twice then use below way. $result = mysql_query(“SELECT * FROM my_table”);while($row = mysql_fetch_assoc($result)) {// inside the loop} The problem is, if you want to loop through the same result set again, you will get an error because the internal pointer is currently at the end […]