Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Radovan Janjic committed Aug 12, 2014
1 parent 32f0c72 commit 0aa7591
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0aa7591

Please sign in to comment.