我有这段代码,我用它来比较时间戳字段和我之前选择的日期!但是我在语法上遇到错误..怎么办?
$query = sprintf( 'SELECT * FROM coupon WHERE date("Y-m-d", "time") = $date' );
错误是:
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 ' "time") = $date' at line 1
同时,我正在比较一个时间戳,即现场时间,以及一个$date
提前感谢的日期..