Categories > TinyButStrong general >

WHERE date > user_date

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Hasan
Date: 2016-01-03
Time: 23:32

WHERE date > user_date

the following code does not work

$date = date('Y-m-d G:i:s',time()-5*60);
$TBS->MergeBlock("userc",$cnx_id,"SELECT * FROM users WHERE updated_at > $date");

the error is
Strong Error when merging block [userc]: MySql error message when opening the query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:29:45' at line 1

How can i change my Problem.
Sorry for my bad English.
By: Hasan
Date: 2016-01-03
Time: 23:47

Re: WHERE date > user_date

$TBS->MergeBlock("userc",$cnx_id,"SELECT * FROM users WHERE (updated_at > '$date')");

that worked!
By: Skrol29
Date: 2016-01-04
Time: 23:01

Re: WHERE date > user_date

ok