June 15th, 2000, 06:34 PM
I'm having a real problem. I've written some scripts to display information from a PostGreSQL database in a table format, and everything is fine.
I've been adding data manually up until now. So, I've written a page where users input their information and this gets inserted into the relevant table. However, this isn't working.
I have been chopping code out to the bare minimum just to get something working, but even the simplest thing doesn't work.
Here's what I've got at the moment :
$resultSet = pg_exec($conn, "INSERT INTO ntable (make, model) VALUES ('Suzuki', 'Bandit'))";
I have connected ok, so there's no problem there, but the above line produces :
Parse error: parse error in /web/sites/042/grendel/www.grendel.f2s.com/addins.php3 on line 39
Please help me someone. I have many different things, but nothing seems to work. The field names are fine, and the data types are both varchar.
Thanks in advance,
June 15th, 2000, 10:55 PM
$resultSet = pg_exec($conn, "INSERT INTO ntable (make, model) VALUES ('Suzuki', 'Bandit')");<-- you had ' ))";'
Another thing to check is do you have an index on at least one of the fields in ntable? - the f2s postgresSQL database is v fussy.
June 16th, 2000, 01:33 PM
D'Oh, what an idiot I am. I think it was too many late nights and a case of not seeing the wood for the trees!
Thanks a lot Simon.