Home  >  Article  >  Backend Development  >  sql like 查询有关问题

sql like 查询有关问题

WBOY
WBOYOriginal
2016-06-13 13:19:561074browse

sql like 查询问题
$sql = select * from `sys_barcode_1d_temp` where date LIKE '2012-07-26%';

数据库里面有数据,为什么值查询不出来?

date字段格式是 Y-m-d H:i:s

------解决方案--------------------
date 是字符串还是日期格式?
------解决方案--------------------
在哪里执行的?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn