Make WordPress Core

Changes between Initial Version and Version 4 of Ticket #5178


Ignore:
Timestamp:
10/13/2007 12:55:42 AM (18 years ago)
Author:
markjaquith
Comment:

Changed the method names.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5178

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
    • Property Summary changed from New $wpdb methods: db_insert(), db_update() to New $wpdb methods: insert(), update()
  • Ticket #5178 – Description

    initial v4  
    88         * @return mixed results of $this->query()
    99         */
    10         function db_insert($table, $data) {
     10        function insert($table, $data) {
    1111                $data = add_magic_quotes($data);
    1212                $fields = array_keys($data);
     
    2222         * @return mixed results of $this->query()
    2323         */
    24         function db_update($table, $data, $where_col, $where_val){
     24        function update($table, $data, $where_col, $where_val){
    2525                $data = add_magic_quotes($data);
    2626                $bits = array();
    2727                foreach ( array_keys($data) as $k )
    2828                        $bits[] = "`$k`='$data[$k]'";
    29                 $where_val = $wpdb->escape($where_val);
     29                $where_val = $this->escape($where_val);
    3030                return $this->query("UPDATE $table SET ".implode(', ',$bits)." WHERE $where_col = '$where_val' LIMIT 1");
    3131        }