[wp-trac] [WordPress Trac] #25559: Enhance prepare method to better support SQL IN operator
WordPress Trac
noreply at wordpress.org
Tue Oct 15 02:46:21 UTC 2013
#25559: Enhance prepare method to better support SQL IN operator
------------------------------------------------+--------------------------
Reporter: cannona | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Database | Review
Severity: normal | Version: trunk
Keywords: has-patch 2nd-opinion dev-feedback | Resolution:
------------------------------------------------+--------------------------
Comment (by cannona):
I agree that having the number in the placeholder is awkward. However,
the only alternative that occurs to me is to place the length in the
parameters list, before the items to insert. For example:
{{{
prepare(
"SELECT a FROM b WHERE c in (%#s)",
count($d),
$d
);
}}}
It seems a little cleaner, but still feels a bit off to me.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25559#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list