[wp-hackers] PostgreSQL port status?
DD32
wordpress at dd32.id.au
Thu Oct 4 08:01:07 GMT 2007
On Thu, 04 Oct 2007 17:51:56 +1000, <usleepless at gmail.com> wrote:
> On 10/4/07, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>> Tom Barta wrote:
>> Replacing all the backticks in a mysql statement passed to
>> $wpdb->prepare is surely just a simple search and replace.
>
> except for the fact you can't use backticks in posts anymore. they
> will be replaced into oblivion.
$wpdb->prepare() takes a sprintf style SQL statement,
eg: http://trac.wordpress.org/ticket/4553
$wpdb->query($wpdb->prepare("UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name));
So the SQL statement passed in can be mangled however you alternate db lovers want without ever having to touch the raw data being queried.
the prepare() was introduced in 2.3 code, Most of the WP code is being altered to make use of it AFAIK for 2.4.
More information about the wp-hackers
mailing list