[wp-trac] Re: [WordPress Trac] #7171: wpdb::insert() &
wpdb::update() need to allow typecasting of params.
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 13 09:28:51 GMT 2008
#7171: wpdb::insert() & wpdb::update() need to allow typecasting of params.
----------------------------+-----------------------------------------------
Reporter: DD32 | Owner: westi
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.7
Component: Administration | Version: 2.6
Severity: normal | Resolution:
Keywords: dev-feedback |
----------------------------+-----------------------------------------------
Comment (by DD32):
Any comments on the method of typecasting?
3 options:
* Hard coded list of tables/fields in wpdb
* ::update() ::insert() add a param to specify types
* use the mysql_ field functions to do a select against the table,
determine the type-casts based on the field type (requires a SELECT * FROM
blah LIMIT 1 query) and cache it
the 3rd option half-takes place on all SELECTS allready:
http://trac.wordpress.org/browser/trunk/wp-includes/wp-db.php#L631
--
Ticket URL: <http://trac.wordpress.org/ticket/7171#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list