# What is wrong with my PHP?

**URL:** <https://forum.kirupa.com/t/what-is-wrong-with-my-php/310835>\
**Category:** programming\
**Created:** [June 21, 2010, 2:01am UTC](https://forum.kirupa.com/t/what-is-wrong-with-my-php/310835 "2010-06-21T02:01:08Z")\
**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 21, 2010, 2:01am UTC](https://forum.kirupa.com/t/what-is-wrong-with-my-php/310835/1 "2010-06-21T02:01:08Z")

</div>

Hi,

I am just trying to goto the next function, and it is giving me errors. Here is how I am doing it:

```php
public function create($params) {
	$query = "INSERT INTO amfphp_db (";
	$query .= "ProductID, Text1, Text2, Text3, Text4, Text5";
	$query .= ") VALUES (";
	$query .= "'{$params[0]}', '{$params[1]}', '{$params[2]}', '{$params[3]}', '{$params[4]}', '{$params[5]}')";
	if ($result = mysql_query($query, $this->connection)) {
		runCoordFunc();
   		return true;

   	}else{
		return false;
     }
	
 }
    
    public function runCoordFunc() {
	$query2 = "UPDATE amfphp_db SET TextCoords = '36' WHERE ID = '54' AND ProductID = '556'";

	if ($result = mysql_query($query2, $this->connection)) {
   		return true;

   	}else{
		return false;
     }
	
	

```
