表名为变量时的语法
$queryResults = $returnClass::findBySql('SELECT * FROM `$returnClassName` where APPID >= :start && APPID <= :end', array(':start' => 0, ':end' => $LastIndex - 1))->all();
在這里要注意,搜索的條件里邊如果有參數,可以使用:variable的形式,但是表名和列名不可以如此使用,要用`表名`,`列名`才可以.
轉載于:https://www.cnblogs.com/wlemory/p/4664002.html
總結
- 上一篇: 怎么选择合适的交通工具前往泰山?
- 下一篇: LeetCode——Pascal#39;