# Problem submitting mysql\_query

**URL:** <https://forum.kirupa.com/t/problem-submitting-mysql-query/311189>\
**Category:** programming\
**Created:** [June 29, 2010, 7:34pm UTC](https://forum.kirupa.com/t/problem-submitting-mysql-query/311189 "2010-06-29T19:34:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![45\_ACP](https://avatars.discourse-cdn.com/v4/letter/4/c4cdca/32.png) [@45\_ACP](https://forum.kirupa.com/u/45_ACP)\
**Post date:** [June 29, 2010, 7:34pm UTC](https://forum.kirupa.com/t/problem-submitting-mysql-query/311189/1 "2010-06-29T19:34:00Z")

</div>

Hi,

I’m having trouble submitting a query through PHP. I want to update multiple rows at once, and my query looks like this (without the line breaks):

```auto
UPDATE Table SET value1='0', value2='5' WHERE ID='1';
UPDATE Table SET value1='0', value2='4' WHERE ID='2';
UPDATE Table SET value1='4', value2='6' WHERE ID='3'

```

This works when I go directly to my SQL database CP and submit the query, but when I try doing it through PHP, it doesn’t work. I ASSUME this is because of the semi-colon ( ; )… or maybe I’m totally wrong.

So can somebody tell me what’s wrong? Thanks a lot!

-45
