Automatically does an INSERT or UPDATE depending if an existing record
exists in a table
public AutoInsertUpdate ( string $tableName, array $valuesArray, array $whereArray ) : boolean | ||
$tableName | string | The name of the table |
$valuesArray | array | An associative array containing the column names as keys and values as data. The values must be SQL ready (i.e. quotes around strings, formatted dates, ect) |
$whereArray | array | An associative array containing the column names as keys and values as data. The values must be SQL ready (i.e. quotes around strings, formatted dates, ect). |
return | boolean | Returns TRUE on success or FALSE on error |