How to avoid duplicate data insertion using php and MySql

mysql-database

This blog will help user learn how to avoid the duplicate entries in the database. Storing duplicate values in the table must be avoided while inserting data in the database table. As these duplicate entries can create many problem in the application.

Developers go with many data insertion practice to avoid duplicate entry which are discussed as below:

1- Remove duplicate values using ‘DISTINCT’ key in mysql query, if it is present in table.

2- Check whether the value is present in table or not using PHP and Mysql before inserting data into the table.

3- We can also avoid duplicate values storing in mysql table while inserting by primary key.

Read more about How to avoid duplicate data insertion using php and MySql visit Findnerd.

 

Advertisements
How to avoid duplicate data insertion using php and MySql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s