I've been trying to delete a row from a table.
I use:
DELETE FROM table WHERE column = '$id'
eg:
$query = "DELETE FROM players WHERE userid = '$userid' ";
mysql_query($query,$link)or die(mysql_error());
it seems like I can only get it to work when ithe "$id" is not the primary key. Can it be done? Is it something I am doing wrong?
I can delete the row when I change the column and its value, but unfortunately the variable I have to work with is the userid.
Can anyone help?
Thanks!