Member-only story
PHP — P87: MySQL Insert Multiple Records with Prepared Statements
You may notice a small buildup between articles, and that’s intentional. No reason to overwhelm or dilute the topic. In this article, we’ll answer one additional question related to inserting data with prepared statements: do you need to keep binding variables for each set of data that you’re inserting?
View this article and others on my website.
Let’s just spoil that response: you don’t. Setup the binding once, change the variables, and execute. It may look a little strange, but as long as you know the flow, it will work.