471,336 Members | 1,261 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

ODBC or native functions?

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
Jul 17 '05 #1
2 1998
NC
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

Jul 17 '05 #2
"NC" <nc@iname.com> wrote in message news:<11********************@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
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bob | last post: by
10 posts views Thread by callmebill | last post: by
4 posts views Thread by Jacob Pallapati | last post: by
4 posts views Thread by Andreas Lauffer | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.