Jump to content

duplicate record notification


lipun4u

Recommended Posts

In my database, after insertion of records, I want to know if the record inserted is duplicate or not. How can I do this ??

 

something like this, i bet someone comes up with a better idea biut

 

insert into ....

 

$last_id = mysql_insert_id();

 

$sql = "select count(*) as count from blah b1 where name = (select name from blah b2 where id = {$last_id}) "

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.