i am having a problem with my insert and delete using php
i delete a player and i am left with a blank ID 0 entry spot in my table, i tried to get rid of it with another delete but it is not working inless i manually go into the table and remove the ID 0 myself
what have i done wrong, could it be that my create table ID field is set to NOT NULL?
i delete a player and i am left with a blank ID 0 entry spot in my table, i tried to get rid of it with another delete but it is not working inless i manually go into the table and remove the ID 0 myself
Code:
$query2="INSERT INTO $_SESSION[T] (ID, Player, Pos, Team) Values('$ID', '$_POST[Plyr]', '$Pos', '$Team')";
echo "Insert worked";
mysql_query($query2, $conn);
echo mysql_error();
Code:
$query4="DELETE FROM $_SESSION[T] where Player='$CutP'";
echo mysql_affected_rows();
mysql_query($query4, $conn);
echo mysql_error();
$query5="DELETE FROM $_SESSION[T] where Player=''";
echo mysql_affected_rows();
mysql_query($query5, $conn);
echo mysql_error();
what have i done wrong, could it be that my create table ID field is set to NOT NULL?