Post by Haluk KarameteWhat's the most recommended way to query MS-SQL from WordPress?
Not sure this really exists... see below for why.
Post by Haluk KarameteI'd like to use the WordPress Database API's and the available functions as
much as I can. Does the current codebase ( 3.9with the myqli ) support
this?
WordPress does not natively support databases other than MySQL. YMMV, but I'm not sure you can repoint WP_Query to MSSQL without hacking core, or that it would even work if you did.
No, mysqli does not support MS SQL -- it's a MySQL library (hence the name ;-).
http://www.php.net/manual/en/intro.mysqli.php
See also:
https://codex.wordpress.org/Using_Alternative_Databases
Post by Haluk KarameteOr do I need to write my own code using PDO?
PDO
or
http://www.php.net/manual/en/intro.mssql.php
or
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Depends on what version of MS SQL you’re connecting to, and which version of PHP you’re going to run the code in (as well as what the host has enabled).
_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske
Post by Haluk KarameteWhat's the most recommended way to query MS-SQL from WordPress?
I'd like to use the WordPress Database API's and the available functions as
much as I can. Does the current codebase ( 3.9with the myqli ) support
this?
Or do I need to write my own code using PDO?
In my theme, I need to query MSSQL and display the results within a page.
That's what I'm up against.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers