I'm getting this error when using PHP's PDO to insert records into an
sqlite3 database. It's only happening on some inserts.
SQLSTATE[HY000]: General error: 25 bind or column index out of range
Now I realise it's probably telling me that some column constraint is
being contravened or maybe that I have an invaldid column name or
something in the insert. However I can't work out what the error is and
without some sort of pointer as to which column (or whatever) is causing
the problem I'm at a bit of a loss to find the error.
The insert query string being handed to the prepare() function is:-
INSERT INTO log (seqno, year, month, day, hour, minute, waterway,
pk, place, distance, eng_hrs, fuel_cm, fuel_lt, note, type ) VALUES
(:seqno, :year, :month, :day, :hour, :minute, :waterway, :pk,
:place, :distance, :eng_hrs, :fuel_cm, :fuel_lt, :note, :type );
and the execute query is being handed an array with matching keys.
I'm *wondering* if the issue may be that a couple of fields have
characters like '-' and ',' in them, do I need to quote or escape these
maybe?
--
Chris Green