Just combine PHP and MySQL to learn,
In advance, is the process-oriented function the same as the object-oriented function?
For example, the query function can be written as follows:
mysql_query ($sql); Method
$conn->query ($sql)//Object
Again such as the Connect_error function, can be written as follows:
Mysqli_connect_error (); Method
$conn->connect_error//process
I'm not experimenting with anything else.
I would like to ask, is not all functions mysqli_ replaced by the object name---line?
There is the operation of data, where is the habit of using the process when the use of the object?
Reply content:
Just combine PHP and MySQL to learn,
In advance, is the process-oriented function the same as the object-oriented function?
For example, the query function can be written as follows:
mysql_query ($sql); Method
$conn->query ($sql)//Object
Again such as the Connect_error function, can be written as follows:
Mysqli_connect_error (); Method
$conn->connect_error//process
I'm not experimenting with anything else.
I would like to ask, is not all functions mysqli_ replaced by the object name---line?
There is the operation of data, where is the habit of using the process when the use of the object?
PHP Deprecated:mysql_connect (): The MySQL extension is Deprecated and would be a removed in the future:
The procedural wording is only supported by Php_mysql, but the PHP high version has canceled the Php_mysql support.
From the code point of view, they are the same, at the end of the same code to implement database operations, the difference is the design.