I need some help figuring out what's wrong with my query
.....//create new db object that connects to the db
$db = new DB2();
if(!$db->connect("DB2CONN", "user","*******"))
{
print "Error\n";
header("location:ERROR.htm");
}
//insert statement to repleace account information with updated information, make sure all fields are filled in,
//if possible use _GET and put in the values into the boxes before the user makes any changes
$sql .="INSERT INTO KCWEB
(ADDR1, ADDR2, CITY, STATE, ZIP, PHONE1, PHONE2, SSN_NUM)
VALUES ($address1, $address2, $city, $state, $zip, $phone1, $phone2, $ssn_num)
WHERE CTRL_NUM = $ctrl_num";
$db->query($sql);
echo "Account Information Updated";
?>
it returns :
Error: [unixODBC][iBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token , was not valid. Valid tokens: ( + - ? : DAY RRN CASE CAST CHAR DATE DAYS HASH HOUR LEFT NULL.
SQL: INSERT INTO KCWEB (ADDR1, ADDR2, CITY, STATE, ZIP, PHONE1, PHONE2, SSN_NUM) VALUES (, , , , , , , 3333) WHERE CTRL_NUM = 3333333333
any help would be great thanks