gpt4 book ai didi

php - LessQL Like 运算符

转载 作者:行者123 更新时间:2023-11-29 17:22:19 25 4
gpt4 key购买 nike

我想这样编写查询:

$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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com