How do i update mysql version in php?

Our cPanel allows you to select the version of PHP that operates on your hosting server. Being able to select the version is essential for compatibility with some php scripts, but it is best to try and run your sever on the newest version available for security and performance benefits.

1. To access the php settings:

a. Type “php” in the find functions dialogue box.

b. Click on Select PHP version

2. The php selector page is shown. If you can leave this set to native, it will ensure you always have the latest version of php.

3. If for compatibility reasons you need to change this, you can click on the drop-down arrow and select the version you wish to have enabled. For example select 7.3.

4. Click set as current to save the selection.

5. You can then also choose any additional php extensions that you need to enable. Some php applications may request these to be enabled and those applications will usually specifically say which extension they need. You can tick those extension names to enable them.

a. You may for example, want the “mysqli” extension enabled in which case you can tick that box to enable that version of the mysql database client interface.

6. There are also php options that you can set.

a. click on the “Switch to PHP Options” button.

7. The php options screen is now shown as follows:

The options you can set are:


Update Data In a MySQL Table Using MySQLi and PDO

The UPDATE statement is used to update existing records in a table:

UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value 

Notice the WHERE clause in the UPDATE syntax: The WHERE clause specifies which record or records that should be updated. If you omit the WHERE clause, all records will be updated!

To learn more about SQL, please visit our SQL tutorial.

Let's look at the "MyGuests" table:

idfirstnamelastnameemailreg_date
1 John Doe 2014-10-22 14:26:15
2 Mary Moe 2014-10-23 10:22:30

The following examples update the record with id=2 in the "MyGuests" table:

Example [MySQLi Object-oriented]

Chủ Đề