php - Output to Local Time - Convert MySQL to MySQLi Function -
the following converts mysql stored date uk time daylight savings. i'm trying mysqli equivalent?
date_default_timezone_set('europe/london'); mysql_query("set time_zone = '".date('p')."';");
here simple example find on w3c
<?php $con=mysqli_connect("localhost","my_user","my_password","my_db"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } // perform queries mysqli_query($con,"select * persons"); mysqli_query($con,"insert persons (firstname,lastname,age) values ('glenn','quagmire',33)"); mysqli_close($con); ?>
google friend. ; )
for date format, it's still php , mysql, nothing worry mysqli
hope helps.
Comments
Post a Comment