This is a discussion on ODBC or native functions? within the PHP Language forums, part of the PHP Programming Forums category; Hi, I am new to MySQL and PHP programming. What is the practical difference between MySQL ODBC functions (3.51 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am new to MySQL and PHP programming. What is the practical difference between MySQL ODBC functions (3.51 Driver) and native mysql support in PHP (I mean "mysql_" functions available in PHP)? (the same question applies to PostgreSQL native functions). Which functions to prefer, in general and in specific situations? Thank you in advance. Marek Kotowski Warsaw |
|
|||
|
Marek Kotowski wrote:
> > What is the practical difference between MySQL > ODBC functions (3.51 Driver) and native mysql > support in PHP (I mean "mysql_" functions available in PHP)? ODBC is designed for connectivity. If you declare your database as an ODBC source, any program that understands ODBC can interact with your database without even knowing it is in fact a MySQL database. Native support, in contrast, is designed for performance. Without an additional middleware layer, databases can be more robust. > Which functions to prefer, in general and in specific > situations? When writing PHP/MySQL applications, there is no compelling reason to use ODBC. ODBC is a Windows-centric technology, and you don't see a lot of people running PHP applications on Windows. Most Web hosting providers run on either BSD or Linux and do not provide ODBC functionality. You may need ODBC if you are working with less common database engines (Adabas, SAP DB, DB2, etc.) that do not have native support in PHP. Cheers, NC |
|
|||
|
"NC" <nc@iname.com> wrote in message news:<1109699365.794294.5200@g14g2000cwa.googlegro ups.com>...
[...] > You may need ODBC if you are working with less common > database engines (Adabas, SAP DB, DB2, etc.) that do not > have native support in PHP. > > Cheers, > NC Thank you. Regards Marek Kotowski Warsaw |