sec número línea error doesn corresponde columnas column code 21s01 php mysql pdo

php - número - La lista de valores insertados no coincide con la lista de columnas: 1136 El recuento de columnas no coincide con el recuento de valores



error 1136(21s01) column count doesn''t match value count at row 1 (1)

Tengo este código de inserción PHP-MySQL:

$sqlTeeth = "INSERT INTO teeth (id_logged, patient_id, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eightteen, nineteen, twenty, twone, twtwo, twthree, twfour, twfive, twsix, twseven, tweight, twnine, thirty, thone, thtwo, date_now) VALUES (:id_logged, :patient_id, :one, :two, :three, :four, :five, :six, :seven, :eight, :nine, :ten, :eleven, :twelve, :thirteen, :fourteen, :fifteen, :sixteen, :lone, :ltwo, :lthree, :lfour, :lfive, :lsix, :lseven, :leight, :lnine, :lten, :leleven, :ltwelve, :lthirteen, :lfourteen, :lfifteen, :lsixteen)"; $sqlTeethStmt = $conn->prepare($sqlTeeth); $sqlTeethStmt->bindValue(":id_logged", $id_logged); $sqlTeethStmt->bindValue(":patient_id", $patient_id); $sqlTeethStmt->bindValue(":one", $one); $sqlTeethStmt->bindValue(":two", $two); $sqlTeethStmt->bindValue(":three", $three); $sqlTeethStmt->bindValue(":four", $four); $sqlTeethStmt->bindValue(":five", $five); $sqlTeethStmt->bindValue(":six", $six); $sqlTeethStmt->bindValue(":seven", $seven); $sqlTeethStmt->bindValue(":eight", $eight); $sqlTeethStmt->bindValue(":nine", $nine); $sqlTeethStmt->bindValue(":ten", $ten); $sqlTeethStmt->bindValue(":eleven", $eleven); $sqlTeethStmt->bindValue(":twelve", $twelve); $sqlTeethStmt->bindValue(":thirteen", $thirteen); $sqlTeethStmt->bindValue(":fourteen", $fourteen); $sqlTeethStmt->bindValue(":fifteen", $fifteen); $sqlTeethStmt->bindValue(":sixteen", $sixteen); $sqlTeethStmt->bindValue(":lone", $lone); $sqlTeethStmt->bindValue(":ltwo", $ltwo); $sqlTeethStmt->bindValue(":lthree", $lthree); $sqlTeethStmt->bindValue(":lfour", $lfour); $sqlTeethStmt->bindValue(":lfive", $lfive); $sqlTeethStmt->bindValue(":lsix", $lsix); $sqlTeethStmt->bindValue(":lseven", $lseven); $sqlTeethStmt->bindValue(":leight", $leight); $sqlTeethStmt->bindValue(":lnine", $lnine); $sqlTeethStmt->bindValue(":lten", $lten); $sqlTeethStmt->bindValue(":leleven", $leleven); $sqlTeethStmt->bindValue(":ltwelve", $ltwelve); $sqlTeethStmt->bindValue(":lthirteen", $lthirteen); $sqlTeethStmt->bindValue(":lfourteen", $lfourteen); $sqlTeethStmt->bindValue(":lfifteen", $lfifteen); $sqlTeethStmt->bindValue(":lsixteen", $lsixteen); $sqlTeethStmt->execute();

Cuando agrego algo a la base de datos, recibí este error:

SQLSTATE [21S01]: la lista de valores insertados no coincide con la lista de columnas: 1136 El recuento de columnas no coincide con el recuento de valores en la fila 1

Cualquier ayuda es apreciada.


Su tabla de base de datos tiene 35 columnas

id_logged, patient_id, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eightteen, nineteen, twenty, twone, twtwo, twthree, twfour, twfive, twsix, twseven, tweight, twnine, thirty, thone, thtwo, date_now

Donde como los valores que está pasando son 34 columnas

VALUES (:id_logged, :patient_id, :one, :two, :three, :four, :five, :six, :seven, :eight, :nine, :ten, :eleven, :twelve, :thirteen, :fourteen, :fifteen, :sixteen, :lone, :ltwo, :lthree, :lfour, :lfive, :lsix, :lseven, :leight, :lnine, :lten, :leleven, :ltwelve, :lthirteen, :lfourteen, :lfifteen, :lsixteen)

Esta falta de coincidencia de columnas le está dando el error.

Olvidaste pasar el valor de la columna date_now . una vez que pase, se resolverá el error