How to format long MySQL Insert-Statements

QuestionsHow to format long MySQL Insert-Statements
sethbeckerman5 Staff asked 4 years ago

this might be a silly question, but I struggle with it a lot.
I usually have very long MySQL Insert statements which take many arguments. The arguments are all represented by question marks. Because of that, my code gets very confusing when I have to add more arguments in the middle. (EDIT: Can't add all of the variables from the start, due to changing customer requirements)

At the moment, I just count the question marks to find out where to add the variables. However, if you have 25 arguments, it takes a lot of time.
I didnt find good tips on google.
Very thankful for any help!


View on Stack Overflow