Function db_update
Handy MYSQL update operation
Package: PHPLucidFrame\Core
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/db_helper.mysqli.php
Copyright: Copyright (c), PHPLucidFrame.
License: MIT License This source file is subject to the MIT license that is bundled with this source code in the file LICENSE
Author: Sithu sithu@phplucidframe.com
Located at helpers/db_helper.mysqli.php
string |
$table |
The table name without prefix |
array |
$data = array() |
<p>The array of data field names and values The first field/value pair will be used as condition when you do not provide the fourth argument</p> <pre><code>array( 'condition_field' => $conditionFieldValue, 'field_name_to_slug' => $valueToSlug, 'field_name_1' => $value1, 'field_name_2' => $value2 ) </code></pre> |
boolean |
$useSlug = true |
<p>TRUE to include the slug field or FALSE to not exclude it The fourth argument can be provided here if you want to omit this.</p> |
array |
$condition = array() |
<p>The condition for the UPDATE query. If you provide this, the first field of <code>$data</code> will not be built for condition but used to be updated</p> <h3>Example</h3> <pre><code>array( 'field_name_1' => $value1, 'field_name_2 >=' => $value2, 'field_name_3' => NULL ) </code></pre> <p>array of OR condition syntax,</p> <pre><code>array( '$or' => array( 'field_name_1' => $value1, 'field_name_2 >=' => $value2, 'field_name_3' => NULL ) ) </code></pre> |
boolean
|
Returns TRUE on success or FALSE on failure |