Kod
CREATE TABLE `sections` (
`sid` int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL,
`content` text NOT NULL,
`position` int(11) NOT NULL default '0',
PRIMARY KEY (`sid`)
)
`sid` int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL,
`content` text NOT NULL,
`position` int(11) NOT NULL default '0',
PRIMARY KEY (`sid`)
)
model:
Kod
class Sections extends Zend_Db_Table_Abstract
{
protected $_name = 'sections';
protected $_primary = 'sid';
[...]
}
{
protected $_name = 'sections';
protected $_primary = 'sid';
[...]
}
Gdy używam PDO_SQLITE dostaje error:
Kod
Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'Primary key column(s) (sid) are not columns in this table ()'
W przypadku PDO_MYSQL wszystko śmiga. Co może być nie tak?
Pozdrawiam.