Closed Holo-Buckshot closed 6 years ago
The reason you got that error is because your query has 10 question marks, but you only provided one value: whatever the values
variable is. If that variable actually is an array of those 10 values, just remove the surrounding [
and ]
. If that doesn't work for you, can you provide what the contents of the values
variable is?
alright let me do that, the values is an array but it's a rather large amount of code that goes into building that array since i'm reading off json data, transforming objects into array data then shoving it into a database, really annoying....
Looks like that was the issue, thanks, i guess i really was being a total dumbass. However now i have more problem, awesome :P oh well, coding is just an endless line of bugs anyways.
No problem!
Dear lord that is a long title but i wanted to make sure i properly described the issue.
straight from the github page This doesn't work with sql and throws an error. I tried it with my database values
and it throws an error see below I also checked the sql syntax on this website https://www.piliapp.com/mysql-syntax-check/ both mine and the example and it still gets mad at that first question mark.
I'm not exactly sure if i'm somehow doing this wrong or maybe the documentation is incorrect. I could probably live without it. This happens to be a special case where i'll be needing multiple inputs for an update call, but it would be nice to know if something is wrong or i'm just being an idiot.