Jump to content

invalid input syntax for type timestamp


clay1

Recommended Posts

This function is throwing the following error:

 

invalid input syntax for type timestamp "1301297896"

 

 function removeInactiveUsers(){
      if(!TRACK_VISITORS) return;
      $timeout = time()-USER_TIMEOUT*60;
      
$result = pg_query_params($this->connection, "delete from active_users where timestamp < $1", array($timeout));
      $this->calcNumActiveUsers();
   }

 

I know the problem is with $timeout using a php timestamp vs postgresql timestamp but I'm not sure how to fix that

Link to comment
https://forums.phpfreaks.com/topic/231928-invalid-input-syntax-for-type-timestamp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.