whitespirit Posted March 23, 2009 Share Posted March 23, 2009 Bonjour,J'essaie de développer mon premier module. Tout se passe bien, sauf que la ligne suivante Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'connections`; TRUNCATE `'._DB_PREFIX_.'connections_page`; TRUNCATE `'._DB_PREFIX_.'date_range`; TRUNCATE `'._DB_PREFIX_.'guest`; TRUNCATE `'._DB_PREFIX_.'page_viewed`; '); La requête 'nest pas exécuté car j'ai toujours les éléments dans les tables concernés. Quand j'affiche cette requête j'ai la bonne chaîne SQL qui s'exécute bien depuis un phpmyadmin.J'ai raté qq chose ? Comment exécuter un Truncate ?Merci d'avance. Link to comment Share on other sites More sharing options...
willow Posted March 23, 2009 Share Posted March 23, 2009 essai plutôt ; Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'connections`'); Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'connections_page`'); Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'date_range`'); Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'guest`'); Db::getInstance()->ExecuteS(' TRUNCATE `'._DB_PREFIX_.'page_viewed`'); je ne pense pas que php sais génrer plusieurs commande sql en une instance sinon met un "OR DIE (mysql_error())" Link to comment Share on other sites More sharing options...
whitespirit Posted March 23, 2009 Author Share Posted March 23, 2009 Merci, ça fonctionne bien en lançant plusieurs requête. Encore merci. Link to comment Share on other sites More sharing options...
willow Posted March 23, 2009 Share Posted March 23, 2009 je t'en prie Link to comment Share on other sites More sharing options...
Julien Breux Posted May 19, 2009 Share Posted May 19, 2009 Tu vide toutes ces tables ? 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