[wp-hackers] mysql_real_connect instead of mysql_connect
Ryan Boren
ryan at boren.nu
Mon Feb 26 06:59:48 GMT 2007
On 2/25/07, Jamie Talbot <wphackers at jamietalbot.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Aaron Brazell wrote:
> > Perhaps I should have phrased the question "why would you use mysql_connect"... The wpdb class is a decent tool for doing sql without injection, etc.
> >
> > Heh... It was just a question on my part. Like I said, don't want to sound snarky. :)
>
> I don't think he wants to use mysql_connect() directly, I think he wants WP to use
> mysql_real_connect() instead of mysql_connect() (Correct me if I'm wrong, Sai)
>
> And it didn't sound snarky, though my response probably did :)
>
> Back to the question though - does anyone know of a good reason *not* to use mysql_real_connect()?
> Especially as 2.2 is going to MySQL 4.1... (Is that still the plan?)
Is there a mysql_real_connect() function in php? I think you have to
use mysqli_real_connect() which means using the mysqli extension. If
so, what we're really talking about is mysqli support.
As for MySQL 4.1, bumping to MySQL 4.0 for WP 2.1 created a lot more
grief than we expected. Bumping to 4.1 may need to be debated more.
I think we'll need to consider adding support for both mysqli and
mysql. If we can't reliably auto-detect at run time which to use, we
can make it a config setting like drupal and others do.
Ryan
More information about the wp-hackers
mailing list