# Sending multiple Queries at same time?

**URL:** <https://forum.kirupa.com/t/sending-multiple-queries-at-same-time/310901>\
**Category:** programming\
**Created:** [June 22, 2010, 5:05pm UTC](https://forum.kirupa.com/t/sending-multiple-queries-at-same-time/310901 "2010-06-22T17:05:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [June 22, 2010, 5:05pm UTC](https://forum.kirupa.com/t/sending-multiple-queries-at-same-time/310901/1 "2010-06-22T17:05:28Z")

</div>

Hey there,

I am trying to query multiple things, so I can insert them into different fields within a table. I am a PHP newbsors, and having trouble at this part.

Running one query, is not a problem. I need to do more than that though. Hopefully PHP has the power to run more than one at a time :ponder::gas:

Here is the current PHP code I have

```php
public function runCoordFunc($params) {
	$ProdID = $params[0];
	$Tcoords = $params[1];
        $PicID = $params[2];
        $Pcoords = $params[3];
	$query2 = "UPDATE amfphp_db SET TextCoords = '$Tcoords' WHERE ProductID = '$ProdID'";
	if ($result = mysql_query($query2, $this->connection)) {
   		return true;

```

So this works fine but I need to run more queries. One to insert $PicID into a field, and another to insert $Pcoords into a field. Where do I go from here?

Can I just add the Queries, line by line? Maybe extend the if statement to encapsulate all the Queries?

Thanks so much if anyone knows :love:
