ODBC or native functions?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


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

Re: ODBC or native functions?

Marek Kotowski wrote:
Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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.


Re: ODBC or native functions?

Quoted text here. Click to load it

Thank you.

Marek Kotowski

Site Timeline