jquery - Error in Inserting Values into PostgreSQL table through php -
i'm trying insert received values postgresql table using php. can't figure out why statement doesn't work
$query = "insert user_info (name, emailaddress, phonenumber, jobdesc) values ('" . $name . "," . $emailaddr . "," . $phonenumber . "," . $jobdesc ."')";
i error:
query failed: error: column "emailaddress" of relation "user_info" not exist
however, tried one:
$query = "insert user_info values ('" . $name . "," . $emailaddr . "," . $phonenumber . "," . $jobdesc ."')";
it works, inserts values first column!
i'm not sure i'm missing here!
i think missing whole host of single quotes in values
list...
$query = "insert user_info (name, emailaddress, phonenumber, jobdesc) values ('" . $name . "','" . $emailaddr . "','" . $phonenumber . "','" . $jobdesc ."')";
php jquery postgresql
No comments:
Post a Comment