- Developer documentation
- Common codes
- Universal codes
- PHP functions
- Database management functions
- MyMysqlUpdate
MyMysqlUpdate
Declaration
MyMysqlUpdate(table,set,record_id,no_modifiers): string
Source: /includes/common/mysql.php
Parameters
table
The name of the table to update.set
The fields to be updated and their values. The indices of the elements of the array are the fields, and their values are the new values of the fields. Example:
$set = array(
field1 => $value1,
field2 => Lorem ipsum
);record_id
Identify the entry to update. Its type can be integer or string. If integer, the id of the entry is indicated by the parameter. If the type is string, then the value of the WHERE branch must be defined in it.no_modifiers
If TRUE, it does not modify the modifier_id and date_modified fields in the post. It is worth using this if you are updating a table that is not an OCMS standard table and the mentioned fields do not exist in it.
Return values
It returns an SQL statement constructed and executed based on the parameters in the form of a string.






