PHP/MySQL - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

PHP/MySQL

DavidJackson4DavidJackson4 Posts: 33Member
I'm trying to use the MySQL/PHP function ADDTIME, but it is not working. anyone know why? I want to add this date time to the time and echo it.

$result_d = mysql_query("SELECT ADDTIME('1997-12-31 23:59:59.999999',
'1 1:1:1.000002')",$dbh);
$myrow_d = mysql_fetch_row($result_d);
$d2000 = $myrow_d[0];
echo $d2000;

Comments

  • DavidJackson4DavidJackson4 Posts: 33Member
    : I'm trying to use the MySQL/PHP function ADDTIME, but it is not working. anyone know why? I want to add this date time to the time and echo it.
    :
    : $result_d = mysql_query("SELECT ADDTIME('1997-12-31 23:59:59.999999',
    : '1 1:1:1.000002')",$dbh);
    : $myrow_d = mysql_fetch_row($result_d);
    : $d2000 = $myrow_d[0];
    : echo $d2000;
    :

    Nevermind... I think I'm using too early a version for MySQL.
Sign In or Register to comment.