insert adding double entries
Posted: Sun May 28, 2006 7:05 pm
Hi all
I am getting strange behaviour from an insert statement to a simple table. I insert like;
It keeps adding two records instead of one! At first it didnt have a unique id so i added one and it still adds two records with unique ids. I tried to hack around it deleting a record after with
But that deletes 2 records too!
What am i doing?
Any help or advice much appreciated.
I am getting strange behaviour from an insert statement to a simple table. I insert like;
Code: Select all
$InsertFav = "INSERT INTO favourites VALUES($AdID,$inID, 1,'')";Code: Select all
$delID = mysql_insert_id();
$deleteExtraFav = "DELETE FROM favourites WHERE id=$delID";What am i doing?
Any help or advice much appreciated.