skip to Main Content

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while there are pending result sets – Phpmyadmin

$query = "CALL GetAllCategories()"; $stmt = $pdo->prepare($query); $stmt->execute(); $categories = $stmt->fetchAll(); I use this code to get categories from DB using stored procedures, no problems with that, everything works fine. This is GetAllCategories() procedures: DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllCategories`()…

VIEW QUESTION

MySQL stored procedure syntax error for cursor select – Phpmyadmin

DROP PROCEDURE CREATE_DUPLICATE_PRODUCT; DELIMITER $$ CREATE PROCEDURE `CREATE_DUPLICATE_PRODUCT`(IN `old_course_id` INT(25), IN `new_course_id` INT(25)) BEGIN DECLARE db_cursor CURSOR FOR SELECT lic.org_id, lic.course_id, lic.license_duration_typeid, lic.insert_date, lic.insert_by, lic.quantity FROM cdp_organization_licenses as lic JOIN cdp_organization_license_settings as sett ON sett.org_license_id = lic.id JOIN cdp_organization_purchases as…

VIEW QUESTION

Error while returning multiple ResulSets from a stored procedure in MySQL – Phpmyadmin

Here's shortened script of my stored procedure: DROP PROCEDURE IF EXISTS `GetVehicleDetails`; DELIMITER // CREATE PROCEDURE `GetVehicleDetails`( IN `inRefNo` VARCHAR(30) COLLATE utf8mb4_general_ci, IN `inSurveyType` VARCHAR(20) COLLATE utf8mb4_general_ci ) BEGIN DECLARE vehicleTypeID VARCHAR(2); SET FOREIGN_KEY_CHECKS = OFF; SELECT * FROM vehicle_details…

VIEW QUESTION

Can't disable ONLY_FULL_GROUP_BY – Magento

I am having an issue with ONLY_FULL_GROUP_BY on MySQL 5.7.14 where I can't seem to disable it even though I've set the SQL mode. I have set both @@sql_mode to remove ONLY_FULL_GROUP_BY by running this command: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));…

VIEW QUESTION
Back To Top
Search