The way this is working is that I call a SP to insert each "record" in an HTML form posted.
if the field value comes over blank, it was not posting null.
here's the modified SP, does it look correct to handle this problem?
CREATE PROCEDURE `update_team`(pid int, tid int, pname varchar(50), jrsy varchar(3), age int)
BEGIN
IF EXISTS(SELECT 1 FROM players WHERE playerid = pid) THEN
IF LENGTH(TRIM(jrsy)) = 0 THEN
UPDATE players
SET playername = pname,
jersey = NULL,
age = age
WHERE playerid = pid;
ELSE
UPDATE players
SET playername = pname,
jersey = jrsy,
age = age
WHERE playerid = pid;
END IF;
ELSE
IF LENGTH(TRIM(jrsy)) = 0 THEN
INSERT INTO players
(playerid, teamid, playername, jersey, age)
VALUES
(0, tid, pname, NULL, age);
ELSE
INSERT INTO players
(playerid, teamid, playername, jersey, age)
VALUES
(0, tid, pname, jrsy, age);
END IF;
END IF;
END;