PDA

View Full Version : What’s the difference between using mysql_ functions and PDO?



sinelogixtech
06-27-2018, 06:46 AM
What’s the difference between using mysql_ functions and PDO?

RH-Calvin
06-29-2018, 04:57 AM
mysqli is a replacement for the mysql functions, with object-oriented and procedural versions. It has support for prepared statements. PDO (PHP Data Objects) is a general database abstraction layer with support for MySQL among many other databases.

sinelogixtech
07-25-2018, 10:51 AM
MySQL is Popular open source relational database management system
PDO –PHP extension similar to MySQLi. Provides object oriented way to access database
PDO will work on 12 different database systems, where as MySQLi will only work with MySQL databases.
Both are object-oriented, but MySQLi also offers a procedural API.

davidweb09
10-12-2018, 06:08 PM
In PDO we include any CSS, JS file in header, Its functions will automatically picked up in any class. https://www.krends.com/

Akshay_M
02-08-2023, 09:21 AM
Mysqli can be used in either an object-oriented style or a procedural style. PDO is always object-oriented. Mysqli is only for the MySQL database. PDO supports a variety of other brands of database using the same functions.

lovespecialist6
02-09-2023, 07:04 AM
As stated earlier, both PDO and MySQLi are extremely similar, but there's slight differences in syntax. MySQLi follows the old-school PHP snake_case convention, while PDO uses camelCase. Additionally, MySQLi's methods are used as object properties, while PDO uses the traditional syntax for functions.