Only list field types that are not strings. see #7171
git-svn-id: http://svn.automattic.com/wordpress/trunk@10726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d6ee6062a6
commit
cb712c991d
|
@ -718,7 +718,6 @@ class wpdb {
|
||||||
$formatted_fields[] = $form;
|
$formatted_fields[] = $form;
|
||||||
}
|
}
|
||||||
$sql = "INSERT INTO $table (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')";
|
$sql = "INSERT INTO $table (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')";
|
||||||
error_log($sql);
|
|
||||||
return $this->query( $this->prepare( $sql, $data) );
|
return $this->query( $this->prepare( $sql, $data) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,7 +763,6 @@ class wpdb {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE $table SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );
|
$sql = "UPDATE $table SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );
|
||||||
error_log($sql);
|
|
||||||
return $this->query( $this->prepare( $sql, array_merge(array_values($data), array_values($where))) );
|
return $this->query( $this->prepare( $sql, array_merge(array_values($data), array_values($where))) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,11 +247,14 @@ require (ABSPATH . WPINC . '/compat.php');
|
||||||
require (ABSPATH . WPINC . '/functions.php');
|
require (ABSPATH . WPINC . '/functions.php');
|
||||||
require (ABSPATH . WPINC . '/classes.php');
|
require (ABSPATH . WPINC . '/classes.php');
|
||||||
|
|
||||||
$db_field_types = array( 'post_author' => '%d', 'post_date' => '%s', 'post_date_gmt' => '%s', 'post_content' => '%s', 'post_content_filtered' => '%s', 'post_title' => '%s',
|
/**
|
||||||
'post_excerpt' => '%s', 'post_status' => '%s', 'post_type' => '%s', 'comment_status' => '%s', 'ping_status' => '%s', 'post_password' => '%s', 'post_name' => '%s',
|
* Format specifiers for DB columns. Columns not listed here default to %s.
|
||||||
'to_ping' => '%s', 'pinged' => '%s', 'post_modified' => '%s', 'post_modified_gmt' => '%s', 'post_parent' => '%d', 'menu_order' => '%d', 'guid' => '%s', 'term_id' => '%d',
|
* @since 2.8.0
|
||||||
'name' => '%s', 'slug' => '%s', 'term_group' => '%d', 'term_taxonomy_id' => '%d', 'description' => '%s', 'taxonomy' => '%s', 'parent' => '%d', 'count' => '%d',
|
*/
|
||||||
'object_id' => '%d', 'term_order' => '%d');
|
$db_field_types = array( 'post_author' => '%d', 'post_parent' => '%d', 'menu_order' => '%d', 'term_id' => '%d', 'term_group' => '%d', 'term_taxonomy_id' => '%d',
|
||||||
|
'parent' => '%d', 'count' => '%d','object_id' => '%d', 'term_order' => '%d', 'ID' => '%d', 'commment_ID' => '%d', 'comment_post_ID' => '%d', 'comment_parent' => '%d',
|
||||||
|
'user_id' => '%d', 'link_id' => '%d', 'link_owner' => '%d', 'link_rating' => '%d', 'option_id' => '%d', 'blog_id' => '%d', 'meta_id' => '%d', 'post_id' => '%d',
|
||||||
|
'user_status' => '%d', 'umeta_id' => '%d');
|
||||||
|
|
||||||
require_wp_db();
|
require_wp_db();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue