im experiencing a problem where i have
one insert
then sleep(25)
then second insert.
datetime from first insert ALWAYS matches the datetime from second insert.
The problem is that both inserts happen at the same time after sleep. So i placed a condition for the second insert that checks for the first insert but the problem is there. I am using Zend DB select.
Notes:
I have also tried live()->query($sql) and have the same results
$sql = "insert into leads_verify
(customer, lead_id,dt)
values
('2'
,'111'
,'". date("Y-m-d H:i:s")."')";
$queryResult = Db::live()->exec($sql);
if($queryResult <> '5' ){
sleep(24);
}
$sql2 = "insert into leads_verify
(customer, lead_id,dt)
values
('3'
,'222'
,'". date("Y-m-d H:i:s")."')";
$queryResult = Db::live()->exec($sql2);
The datetime of insertion is always the same for both. Any ideas?
The solution i used was to connect using mysql_query and run the sql that way. Thanks aLL