作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想这样编写查询:
$query = $orm->table();
->where('foo_id', $foo['id'])
->like('foo_name', '%DP')
->fetch();
错误是:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.like' doesn't exist in /var/www/webapp/app/vendor/morris/lessql/src/LessQL/Database.php:117
最佳答案
您可以通过 where()
调用进行 LIKE
:
$query = $orm->table()
->where('foo_id', $foo['id'])
->where('foo_name LIKE ?', array('%DP'))
->fetch();
关于php - LessQL Like 运算符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51186578/
是否可以通过 LessQL 在数据库中触发自定义查询? 询问的原因是我想做这样的查询: DESCRIBE TableName (这是一个Mysql的东西) 所以也许像 $db->customquery
我想这样编写查询: $query = $orm->table(); ->where('foo_id', $foo['id']) ->like('
我是一名优秀的程序员,十分优秀!