AngelDisc Posted May 29, 2011 Share Posted May 29, 2011 Bonjour.Je cherche une solution pour dire que si une table n'existe pas, mon module mette un message d'erreur(Mon module se sert d'un module existant qui lui contient la BDD) $bddexist = 'if not exists (select * FROM `'._DB_PREFIX_.'sekeyword`)'; if (Db::getInstance()->ExecuteS($bddexist)) $this->warning = $this->l('Activer le module "Mots clés" dans les stats'); J'ai essayé ça, mais j'ai pas l'impression que cela fonctionne.Merci de votre aide Link to comment Share on other sites More sharing options...
Asenar Posted May 29, 2011 Share Posted May 29, 2011 Pour vérifier l'existence d'une table, tu peux faire la requete 'show table like ""'Et renomme ta variable en $tableExists pour que ça reste cohérent Link to comment Share on other sites More sharing options...
AngelDisc Posted May 29, 2011 Author Share Posted May 29, 2011 Merci pour la solution, c'est parfait ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now