Add ON DUPLICATE UPDATE
and take care that there is something that is unique and can’t be changed like an article_ID
that exists in the old and in the new article
BTW: I would recommend using prepared statements
More Related Contents:
- php+mysql Fatal error: Call to undefined function mysql_connect()
- Using PHP data in MySQL [closed]
- How to add Hyperlink on php/html table that displays information from mysql database [closed]
- PHP + MySQL transactions examples
- How to display errors for my MySQLi query? [duplicate]
- How to retrieve images from MySQL database and display in an html tag
- Automated or regular backup of mysql data
- Best way to avoid duplicate entry into mysql database
- Fatal error: Call to undefined function session_register()
- PHP: Warning: sort() expects parameter 1 to be array, resource given
- PHP date() format when inserting into datetime in MySQL
- convert php date to mysql format
- Special characters in PHP / MySQL
- Fetching single row, single column with PDO
- MySQL db question marks instead of hebrew characters..?
- IP address storing in MySQL database using PHP [duplicate]
- “No such file or directory” or “No such host is known” when running migrations
- How to convert IPv6 from binary for storage in MySQL
- Password_Hash not working on my PHP login
- Select last 20 order by ascending – PHP/MySQL
- mysqli – fetch_Array error call to a member function fetch_array() on a non-object mysqli [duplicate]
- How can I do a migration in laravel 5.5?
- Best way to store IP in database?
- Which is fastest in PHP- MySQL or MySQLi?
- How to get last inserted id from table MySQL [duplicate]
- Is mysql_real_escape_string enough to Anti SQL Injection?
- How can I list data in sections by an ID, with a while loop in PHP? [closed]
- Save array in mysql database
- Using PHP to upload file and add the path to MySQL database
- find in set in laravel ? example