Jump to content

MySQL/php


LRM_php

Recommended Posts

Hey Guyz

 

Im tryin to do an update in my table from my php page heres my code:

 

 

function UpdateOwn($Title,$Name,$Address,$Phone,$OwnID)

 

{

 

$updateQuery = "UPDATE tblOwner

SET Title = $Title,

Name = $Name,

Address = $Address,

Phone = $Phone

WHERE OwnerID = $OwnID";

 

$result = mysql_query($updateQuery);

 

if (!$result)

{

 

$errorString = mysql_error();

echo("<br> The error was,  $errorString <br>");

}

 

}

 

UpdateOwn($OwnTitle,$OwnName,$OwnAddress,$OwnPhone,$PatOwner);//from form data

 

i keep getting this error:

 

The error was, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Jump St, Phone = 0210220345 WHERE OwnerID = 1005' at line 4

 

Link to comment
https://forums.phpfreaks.com/topic/100468-mysqlphp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.