I need to insert multiple rows in my Mysql database.my rows are available in my dataset.
i am using for loop to send the row one by one is that right way?…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can insert multiple rows using a single SQL statement like so:
Update:
MarkR is right in his comment – if you’re collecting data from a user, or you’re compiling information, you can build the query dynamically with something like:
Two important points to note: