I want to insert data in a table only if the record with a given CatalogID does not exist.
CatalogID
$userId = $_POST[\'userId\']; $catalogID = $_POST[\
You could use this sort of function
public function Checkrecord($catalogID ) { $query="Select * from table_name where catalog_id=$catalogID "; mysql_query($query,$con); if(mysql_num_rows($query)>0) { //report error } else { //insertQuery } }