[wp-trac] [WordPress Trac] #15158: wpdb insert & update with null values
WordPress Trac
noreply at wordpress.org
Fri Jan 4 20:15:08 UTC 2013
#15158: wpdb insert & update with null values
-------------------------+-----------------------------
Reporter: westi | Owner: sorich87
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future Release
Component: Database | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------------
Comment (by miqrogroove):
I think a better strategy would be to run to separate loops:
foreach($args) to create a list of which args were NULL and unset them,
followed by foreach($positions[0]) to modify the query string.
This strategy would avoid duplicating the $args array, which is
potentially extremely expensive when working with large queries.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15158#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list