查询语言.prefix

函数原型

  1. public function prefix($mixPrefix);

用法如下

  1. # SELECT SQL_CALC_FOUND_ROWS `test`.* FROM `test` WHERE `test`.`id` = 5
  2. Db::table('test')->
  3. prefix('SQL_CALC_FOUND_ROWS')->
  4. where('id', '=', 5)->
  5. getAll();
  6. # SELECT SQL_NO_CACHE `test`.* FROM `test` WHERE `test`.`id` = 5
  7. Db::table('test')->
  8. prefix('SQL_NO_CACHE')->
  9. where('id', '=', 5)->
  10. getAll();