Codeigniter - Batch Update with Multiple Where Conditions

前端 未结 3 647
无人及你
无人及你 2020-12-11 01:30

For starters, the Codeigniter documentation on update_batch does not exist. kenjis was kind enough to provide some documentation and submit it to the repository. Hopefully t

3条回答
  •  爱一瞬间的悲伤
    2020-12-11 01:39

    You can't add multiple where clauses to update_batch(). It only accepts a string as the third parameter for the where clause so I'm sure there's no way to do this the way the method is currently written.

    From the source:

    /**
     * Update_Batch
     *
     * Compiles an update string and runs the query
     *
     * @param   string  the table to retrieve the results from
     * @param   array   an associative array of update values
     * @param   string  the where key
     * @return  object
     */
    public function update_batch($table = '', $set = NULL, $index = NULL)
    

提交回复
热议问题