forked from rjanjic/PHP_MySQL_wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Radovan Janjic
committed
Aug 12, 2014
1 parent
32f0c72
commit 0aa7591
Showing
1 changed file
with
1 addition
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,25 +409,6 @@ $data['date'] = 'now()'; | |
$insert_id = $db->arrayToInsert('table', $data); | ||
echo "Last insert id is: {$insert_id}"; | ||
|
||
// Array data | ||
// [fealdname] = feald value | ||
$data = array(); | ||
$data['firstname'] = 'Radovan'; | ||
$data['surname'] = 'Janjic'; | ||
$data['email'] = '[email protected]'; | ||
$data['date'] = 'now()'; | ||
|
||
// [fealdname] = feald value | ||
$data2 = array(); | ||
$data2['firstname'] = 'Radovan'; | ||
$data2['surname'] = 'Janjic'; | ||
$data2['email'] = '[email protected]'; | ||
$data2['date'] = 'now()'; | ||
|
||
// $db->arrayToInsert( ... ) multirow returns TRUE on success | ||
$db->arrayToInsert('table', array($data, $data2 /*, $data3 .... */ )); | ||
|
||
|
||
// More options | ||
/** Creates an sql string from an associate array | ||
* @param string $table - Table name | ||
|
@@ -436,7 +417,7 @@ $db->arrayToInsert('table', array($data, $data2 /*, $data3 .... */ )); | |
* @param string $duplicateupdate - ON DUPLICATE KEY UPDATE (The ON DUPLICATE KEY UPDATE clause can contain multiple column assignments, separated by commas.) | ||
* @return insert id or false | ||
*/ | ||
// $db->arrayToInsert($table, $data, $ignore = FALSE, $duplicateupdate = NULL) | ||
// $db->arrayToInsert($table, $data, $ignore = FALSE, $duplicateupdate = NULL); | ||
|
||
// Close connection | ||
$db->close(); | ||
|
@@ -501,26 +482,6 @@ if($db->affected > 0){ | |
echo "Updated: {$db->affected} row(s)."; | ||
} | ||
|
||
// Array data | ||
// [fealdname] = feald value | ||
$data = array(); | ||
$data['id'] = 1; // key | ||
$data['firstname'] = 'foo'; | ||
$data['surname'] = 'bar'; | ||
$data['email'] = '[email protected]'; | ||
$data['date'] = 'now()'; | ||
|
||
// [fealdname] = feald value | ||
$data2 = array(); | ||
$data2['id'] = 2; // key | ||
$data2['firstname'] = 'Radovana'; | ||
$data2['surname'] = 'Janjic'; | ||
$data2['email'] = '[email protected]'; | ||
$data2['date'] = 'now()'; | ||
|
||
// $db->arrayToUpdate( ... ) multirow returns TRUE on success | ||
$db->arrayToUpdate('table', array($data, $data2 /*, $data3 .... */ )); | ||
|
||
// More options | ||
/** Creates an sql string from an associate array | ||
* @param string $table - Table name | ||
|