This topic is locked

PHPRunner3 Beta error - Field Specified Twice

1/6/2006 11:24:07
PHPRunner General questions
S
sloftus author

I've just used PHPRunner3 to edit some pages created in PHPRunner2. I have two pages which update two tables, the first is a timesheet table and the other is a design log table. In both cases the current username (@$_SESSION["OwnerID"] is inserted automatically. However I get the following 'specified twice' errors...
Technical information

Error type 256

Error description Column 'Name' specified twice

URL design4/Projects/timesheet_add.php?

Error file C:\htdocs\Projects\include\dbconnection.php

Error line 26

SQL query insert into `timesheet` (`Project No`, `Name`, `Input Date`, `Activity Date`, `Activity`, `Comment`, `Time Spent`, `Name`) values (2771, NULL, '2006-01-06 15-49-07', '2006-1-6', 'Project Meeting', 'Design review', 0.5, 'username')
I also get a similar error on the second page..
Technical information

Error type 256

Error description Column 'User' specified twice

URL design4/Projects/design_log_add.php?

Error file C:\htdocs\Projects\include\dbconnection.php

Error line 26

SQL query insert into `design log` (`Project No`, `User`, `Input date`, `Design Log`, `User`) values (2771, 'username', '2006-01-06 16-01-04', 'test', 'username')
However in the first instance the first value inserted into Name is NULL which may be a clue perhaps???
Can you help please?

S
sloftus author 1/6/2006

Think I've found the problem. It seems that if you automatically insert the current user (@$_SESSION["OwnerID"]) as the default value in a user field in step 7/12 then you have to make sure in step 6/12 that the user field is UNCHECKEDin the ADD column. Otherwise it tries to enter data into the same field twice. Seems to have solved the problem.