$tableUsers_1 = Engine_Api::_()->getDbtable('users', 'user');
$select_companies = $tableUsers_1->select();
$select_companies->where('`'.$table->info('name').'`.`level_id` = ?', 6);
这样是查询满足level_id=6的条件是吧,那么我想查询既满足level_id=6又满足enabled=1,查询语句该怎么写呢,这两个条件都在这一个表中。还有 where('`'.$table 中的 '`' 是什么意思!
$select_companies->where('`'.$table->info('name').'`.`level_id` = ? and `enabled `=1', 6);
where('`'.$table 中的 '`' 是字符串拼接,`是用???表名,字段名的,因?如果你表名是index(index 是sql??字),直接?select * from index ??,需要?成 select * from `index`
$select_companies->where('`'.$table->info('name').'`.`level_id` = ? and `enabled `=1', 6);
where('`'.$table 中的 '`' 是字符串拼接,`是用???表名,字段名的,因?如果你表名是index(index 是sql??字),直接?select * from index ??,需要?成 select * from `index`
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号