I have the following code in my install to create a table:
$installer->run(
"CREATE TABLE IF NOT EXISTS `npcallnations_orders` (
`id` INT AUTO_INCREMENT,
`order` int,
`status` int,
`real_order_id` int,
`customer` varchar(245),
`fatdir` int,
`created_at` DATETIME null,
PRIMARY KEY (ID)
)"
);
but if the magento has a table prefix, it will return an error when I try to use the collection. How can I do it so it will create correctly with prefix?
Best Answer
You can use: