The error output just shows "Failed to run query: (0) " I’m afraid, so it’s as if it can’t find an error…
Very strange- the values all seem to arrive ok, but then the UPDATE doesn’t accept them…
interestingly it seems to be getting the values twice- I edited the table so that there are now only two service records for that car. When I tried updating the values again:
As I read this, though, you need to have field descriptors for each of the fields that you intend to replace, using ‘s’ and ‘i’ to indicate string or integer respectively. So don’t you need to replace “ssi” with “ssssi” because you’re supplying four strings and an integer? I have no idea if it would cause the error you’re getting, though.
ETA - is the column name “servicedesc” correct in the update query? You seem to get the data out of a column called “servicehistory”.
the first argument is a string which tells bind_param the data types of the variables you want to bind: s for string, i for integer etc… so that argument actually needs to be “sissi”.
Edit: droopsnoot beat me to it Edit2: and he’s right about the data type string… I forgot that your odometer readings have commas in them
Thanks guys, well the comment about $servicedesc was correct, but I saw that afterwards and changed it to the correct name, same result though.
So I’ve now changed the bind_param to ssssi which is correct (they’re all actually strings aside from the ID)… and it actually seems to be updating- so maybe it was that the bind_param wasn’t seeing a variable type for all the values (is was ssi so now only 3 data types set). ???
Anyway, that seems to be ok now… bit more testing needed. Thanks again!