我想这样编写查询:
$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/