I added two new fields to a table. The SQL insert into
continues to work for the two old fields, but fails to insert any data for the two new fields. The two new fields are $authorflag
and $artistflag
. These two fields are supposed to be boolean
variables.
I have experimented by changing these variables from integer
to string
, changing their position, and even re-creating the table so that all four fields are new. Despite these tweaks, only the two old variables are actually inserted into the table. The new variables show-up as null
.
$authorflag='NNNNNNNN';
$artistflag=0;
login();
$stmt=$conn->prepare('INSERT INTO tblAuthorList (AuthorLast,AuthorFirst,AuthorFlag,ArtistFlag) Values(?,?,?,?)');
$stmt->bind_param('sssi', $lastname,$firstname,$authorflag,$artistflag);
$stmt->execute();