SocialEngine模块安装:查询失败,出现错误

时间:2018-07-14 11:02:19

标签: mysql socialengine

我创建了一个简单的SocialEngine模块,并为其安装创建了一个软件包。在目标系统上的安装过程中,我无法安装模块,并且在完成安装时出现以下错误:

Query failed with error: Mysqli prepare error: This command is not supported in the prepared statement protocol yet

我在settings目录中有两个sql文件,如下所示:

my.sql:

--
-- Table structure for table `engine4_restapi_foods`
--

DROP TABLE IF EXISTS `engine4_restapi_foods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `engine4_restapi_foods` (
  `food_id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `creation_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`image_path` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`food_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `engine4_restapi_foods`
--

LOCK TABLES `engine4_restapi_foods` WRITE;
/*!40000 ALTER TABLE `engine4_restapi_foods` DISABLE KEYS */;
INSERT INTO `engine4_restapi_foods` VALUES (2,'Gheymeh','2018-06-20 16:01:58', 'public/gheymeh.png'),(3,'Ghormeh','2018-06-20 16:01:58', 'public/ghormeh.png'),(4,'Kebab','2018-06-20 16:09:23', 'public/kebab.png'),(5,'Chicken','2018-06-20 16:09:23', 'public/chicken.png');
/*!40000 ALTER TABLE `engine4_restapi_foods` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-06-30 16:44:45

my-install.sql:

INSERT IGNORE INTO `engine4_core_modules` (`name`, `title`, `description`, `version`, `enabled`, `type`) VALUES  ('restapi', 'REST API', 'This is a REST API for food', '4.0.0', 1, 'extra') ;

1 个答案:

答案 0 :(得分:1)

尝试从社交引擎内部的任何位置执行带有预准备语句的所有查询,然后您可以捕获错误?