cakephp中操作数据库的函数总结

1.Model::set($one, $two = null)

2.Model::save(array $data = null, boolean $validate = true, array $fieldList = array())
    
3.Mode::create(array $data = array())

4.Model::saveField(string $fieldName, string $fieldValue, $validate = false)

5.Model::updateAll(array $fields, array $conditions)

6.Model::saveMany(array $data = null, array $options = array())

7.Model::saveAssociated(array $data = null, array $options = array())

8.Model::saveAll(array $data = null, array $options = array())

9.Model::query(string $query)

10.Model::field(string $name, array $conditions = null, string $order = null)

11.Model::read($fields, $id)

12.Model::delete(int $id = null, boolean $cascade = true);

13.Model::deleteAll(mixed $conditions, $cascade = true, $callbacks = false)

14.Model::find(string $type = 'first', array $params = array())
           $type : all, first, count, list. neighbors, threaded

15.findAllBy
findAllBy<fieldName>(string $value, array $fields, array $order, int $limit, int $page, int $recursive)

16.findBy
findBy<fieldName>(string $value);

你可能感兴趣的:(cakephp中操作数据库的函数总结)