Forum Moderators: coopster
$NPquery= 'INSERT into "tbl" values ('.$_POST['first'].','.$_POST['last'].')';
$result=pg_query($dbh, $NPquery) ;
print_r($NPquery);
Warning: pg_query() query failed: ERROR: Attribute "test" not found in /var/www/html/site1/NP2.php on line 51
INSERT into "tbl" values (test,test2) The 2 values I am trying to insert are coming through 'test and test2' so why wont the insert work?
DBMS is Postgresql
Any help appreciated
Bob
INSERT into "tbl" values (test,test2)
when it should be:
INSERT INTO tbl (var1, var2) VALUES ('test', 'test2');