PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

On duplicate key update

Open wakirin opened this issue 12 years ago • 4 comments

Hello, how can use "on duplicate key update" with this class?

wakirin avatar Apr 17 '14 20:04 wakirin

just use rawQuery

wingoo avatar Apr 21 '14 09:04 wingoo

When I use rawQuery, I don't get result when "ON DUPLICATE KEY UPDATE ", and don't know work query or not. How I can get result ?

wakirin avatar Apr 21 '14 10:04 wakirin

you can use getInsertId() to check if insert success

wingoo avatar Apr 21 '14 11:04 wingoo

wingoo Thanks! Now it work.

wakirin avatar Apr 21 '14 11:04 wakirin