[Solar-talk] Collection Oddity

Kilbride, James P. James.Kilbride at gd-ais.com
Tue Jan 29 08:31:03 CST 2008


Hey folks,

One of my guys was playing around with mysql tables and had the
following table definition:

CREATE TABLE `citis`.`Log` (
   `User_Prog_ID` int(10) NULL, 
   `Event_Date` date NOT NULL, 
   `Event_Desc` TEXT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

When I tried to use it as part of a model i can get it to the point
where it does an insert but the fetchAll seems to be dying when I try to
print out data with the following error:

Notice: Undefined index: User_Prog_ID in
C:\Solar\Solar\Sql\Model\Collection.php on line 62

Now the line in question is:

            $primary = $load[$this->_model->primary_col];

Note that the table as defined, does not have a primary key. Is this
what is causing the model to fail? If so then why, after manually
setting it to use the id key as a primary column the system still fails
on that line though. Any ideas folks? Desc Log returns:

"Field","Type","Null","Key","Default","Extra"
"User_Prog_ID","int(10)","NO","PRI","","auto_increment"
"Event_Date","date","NO","","",""
"Event_Desc","text","NO","","",""

James Kilbride
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080129/31f7a202/attachment.html


More information about the Solar-talk mailing list