|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-10 13:45 UTC] tony2001@php.net
[2006-08-10 14:03 UTC] oren at telebox dot co dot il
[2006-08-10 14:12 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 01:00:01 2025 UTC |
Description: ------------ Hello the bug is where i write sql string with date info i get strange result Reproduce code: --------------- $sql = "UPDATE `stat` SET `total`=TIME_TO_SEC(TIMEDIFF('".date("Y-m-d H:i:s")."',startime)) , endtime = '".date("Y-m-d H:i:s")."' WHERE `hendel`='$hendel'"; Expected result: ---------------- the result is lateness of 1 - 6 seconds Actual result: -------------- the way i find to bypass the problem is . $nowsss=date("Y-m-d H:i:s"); $sql = "UPDATE `stat` SET `total`=TIME_TO_SEC(TIMEDIFF('".$nowsss."',startime)) , endtime = '".$nowsss."' WHERE `hendel`='$hendel'";