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 if you did not provide the fourth argument</p> <pre><code>array( 'conditionField' => $conditionFieldValue, 'fieldNameToSlug' => $valueToSlug, 'fieldName1' => $value1, 'fieldName2' => $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|string |
$condition = null |
<p>The condition for the UPDATE query. If you provide this, the first field of <code>$data</code> will not be built for condition</p> <h3>Example</h3> <pre><code>array( 'fieldName1' => $value1, 'fieldName2' => $value2 ) </code></pre> <p>OR</p> <pre><code>db_or(array( 'fieldName1' => $value1, 'fieldName2' => $value2 )) </code></pre> |
boolean
|
Returns TRUE on success or FALSE on failure |