I\'m working on learning to use prepared statements with mysqli in PHP and usually, if I\'m having a problem with a query I just echo it to the screen to see what it looks l
Agreeing with Pascal MARTIN (+1) so I suggest another technique for debugging: var_dump() or log every variable you're inserting into the statement, that way you should be able to figure out if it is wrong data or logically wrong SQL.