select timediff(now(),convert_tz(now(),@@session.time_zone,’+00:00′));
By running below query you can able to get the Current Timezone of the database server.
Related Articles
PHP Radio Button Example With Mysql DB
Simple PHP Radio button enable and disable textarea textbox example in php using Mysql
Decimal(5,3) in Mysql is always 99.999
The maximum value for decimal(5,3) is 99.999, it means 5 digits with 3 digits after decimal, and whenever you try to insert or update more than 99.999 value it is automatically capped to 9.99 in mysql. This Try decimal(5, 2) Decimal(5,3) is used for financial values or less than 100% values. If you want to […]
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 […]