Commit a590ab35 authored by Alexander Butenko's avatar Alexander Butenko

Expand onDuplicate test

parent 8e45c952
......@@ -192,6 +192,15 @@ $updateColumns = Array ("updatedAt");
$insertLastId = "id";
$db->onDuplicate($updateColumns, "id");
$db->insert("users", $user);
$nUser = $db->where('login','user3')->get('users');
if ($db->count != 1) {
echo "onDuplicate update failed. ";
exit;
}
if ($nUser[0]['createdAt'] == $nUser[0]['updatedAt']) {
echo "onDuplicate2 update failed. ";
exit;
}
// order by field
$db->orderBy("login","asc", Array ("user3","user2","user1"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment