Jump to content

Modulo Borra Conexiones Base de Datos


henrycr

Recommended Posts

Hola amigo instale en mi web este modulo Delete connections/expired vouchers/carts and optimize all tables v1.5,pero me esta dando este error

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/22/6679522/html/modules/deleteconnections/deleteconnections.php on line 103

Fatal error: Call to undefined method MySQL::getValue() in /home/content/22/6679522/html/modules/deleteconnections/deleteconnections.php on line 322

 

 

alguien que por favor me ayude.

Link to comment
Share on other sites

Aca esta la parte final del codigo,gracias por tu ayuda.

// -------------- unlink uploaded files associated with any customized product in the cart (similar to deletePictureToProduct() method ) $uploadedFiles = Db::getInstance()->ExecuteS(' SELECT cd.`value` FROM `'._DB_PREFIX_.'customized_data` cd INNER JOIN `'._DB_PREFIX_.'customization` c ON (cd.`id_customization`= c.`id_customization`) WHERE cd.`type`= 0 AND c.`id_cart`='.$idc); foreach ($uploadedFiles as $mustUnlink) { unlink(_PS_UPLOAD_DIR_.$mustUnlink['value'].'_small'); unlink(_PS_UPLOAD_DIR_.$mustUnlink['value']); } Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customized_data` WHERE `id_customization` IN ( SELECT `id_customization` FROM `'._DB_PREFIX_.'customization` WHERE `id_cart`='.$idc.')'); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customization` WHERE `id_cart`='.$idc ); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'message_readed` WHERE `id_message` IN ( SELECT `id_message` FROM `'._DB_PREFIX_.'message` WHERE `id_cart`='.$idc.')' ); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'message` WHERE `id_cart`='.$idc ); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_discount` WHERE `id_cart` = '.$idc); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_product` WHERE `id_cart` = '.$idc); // ignore TABLES fianet_fraud and prestafraud_carts // ------- FINALLY (no multilingual aspect, so avoid calling parent -- just delete it from here) return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart` WHERE `id_cart` = '.$idc); } public function OrderExists() { return (bool)Db::getInstance()->getValue('SELECT `id_cart` FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id); } } ?>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...