Hi !
I've this error when I try to update my addon :
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNSIGNED NOT NULL, `title` VARCHAR(50) UNSIGNED NOT NULL, `date` INT(10)' at line 3
Here is my Install file :
Can you help me please ?
I've this error when I try to update my addon :
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNSIGNED NOT NULL, `title` VARCHAR(50) UNSIGNED NOT NULL, `date` INT(10)' at line 3
- Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
- Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
- Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
- Zend_Db_Adapter_Abstract->query() in Add/Install.php at line 18
- News_Install::install()
- call_user_func() in XenForo/Model/AddOn.php at line 215
- XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
- XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 236
- XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 347
- XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
- XenForo_FrontController->run() in /home/u354649613/public_html/admin.php at line 13
Here is my Install file :
PHP:
<?php
class Add_Install
{
public static function install()
{
$db = XenForo_Application::get('db');
$db->query( "
CREATE TABLE IF NOT EXISTS `xf_add` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creator` VARCHAR(50) UNSIGNED NOT NULL,
`title` VARCHAR(50) UNSIGNED NOT NULL,
`date` INT(10) UNSIGNED NOT NULL,
`message` TEXT NOT NULL,
PRIMARY KEY (`id`)
)
");
}
public static function uninstall()
{
$db = XenForo_Application::get('db');
$db->query("DROP TABLE IF EXISTS `xf_add`;");
}
}
Can you help me please ?