I originally posted this problem in the following Thread:
http://www.gossamer-threads.com/...w=collapsed&sb=5
-----------------------------------------------------------
Okay...I am having some more challenges with getting multiple databases to work...I have worked out most of the bugs, but when I try to add a record into a table located in other databases, I get the following error:
DBSQL (11346): Fatal Error: Unable to execute query: INSERT INTO Year (ID, Name) VALUES (?, '1917') . Reason: Column 'ID' cannot be null at /dir/admin.cgi line 99
Line 99 of admin.cgi is:
my $id = $db->add_record (&cgi_to_hash($in), $in);
So, I looked through sub add_record in the DBSQL.pm module, and I think the problem is pulling the correct ID via the _post_get_id subroutine.
Any thoughts or suggestions for fixing the above error would be appreciated.
BTW: I have searched through the MySQL site and my locally stored MySQL Manual and I can't find anything that would address this problem and since it deals with the core module of Links SQL, I thought others may provide some insight into this matter.
Now...the odd thing is that I can import files into the tables located in the other databases. But when I try to run functions, like ADD, via admin.cgi, I keep getting the above error.
Regards,
Eliot Lee
http://www.gossamer-threads.com/...w=collapsed&sb=5
-----------------------------------------------------------
Okay...I am having some more challenges with getting multiple databases to work...I have worked out most of the bugs, but when I try to add a record into a table located in other databases, I get the following error:
DBSQL (11346): Fatal Error: Unable to execute query: INSERT INTO Year (ID, Name) VALUES (?, '1917') . Reason: Column 'ID' cannot be null at /dir/admin.cgi line 99
Line 99 of admin.cgi is:
my $id = $db->add_record (&cgi_to_hash($in), $in);
So, I looked through sub add_record in the DBSQL.pm module, and I think the problem is pulling the correct ID via the _post_get_id subroutine.
Any thoughts or suggestions for fixing the above error would be appreciated.
BTW: I have searched through the MySQL site and my locally stored MySQL Manual and I can't find anything that would address this problem and since it deals with the core module of Links SQL, I thought others may provide some insight into this matter.
Now...the odd thing is that I can import files into the tables located in the other databases. But when I try to run functions, like ADD, via admin.cgi, I keep getting the above error.
Regards,
Eliot Lee