Неверное целочисленное значение: "для столбца
I have a problem with a line of sql and php code. I keep getting this error and I'm so confused as to what it is
the problem:
Incorrect integer value: '' for column 'ID' at row 1
the sql code:
CREATE TABLE `attendanceout` ( `out_ID` int(10) NOT NULL, `ID` int(10) NOT NULL, `time_out` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `date_info` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `Room` varchar(100) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `attendanceout` ADD PRIMARY KEY (`out_ID`); ALTER TABLE `attendanceout` MODIFY `out_ID` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
this is the php script:
$sql = "INSERT INTO attendanceout (out_ID, ID, time_out, date_info, Room) VALUES ('". $out_id . "', '". $id . "', '" . $time . "', '" . $date. "', '" . $dataSendOut. "')";
Что я уже пробовал:
I already tried to removed the quote in $out_id and $id but a different error appears.
this is the error that appears if I remove the quote. "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"