Jump to content

[SOLVED] Controlling Duplicate Records


joshblue

Recommended Posts

you can use unique as your fields property..

 

or check first before inserting

 

eg...

$user = $_POST['user'];
$query = " select * from table where name = '$user'";
$result =mysql_query($query);
if(mysql_num_rows($result)<=0){
   //INSERTHERE
}else{
    //dontinsert
}

you can use unique as your fields property..

 

or check first before inserting

 

eg...

$user = $_POST['user'];
$query = " select * from table where name = '$user'";
$result =mysql_query($query);
if(mysql_num_rows($result)<=0){
   //INSERTHERE
}else{
    //dontinsert
}

 

Got it! Thanks!  :D

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.