IBACK Posted February 4, 2015 Share Posted February 4, 2015 Bonjour à tous, j'ai ajouté un onglet dans le BACK-OFFICE associé à une page PHP (AdminMyPage.php). Voici le code de la page : <?php include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php'); class AdminMyPage extends AdminTab { private $results; public function __construct() { parent::__construct(); // date du jour $today = getdate(); if ($today['mday'] < 10) $day = "0" .$today['mday']; else $day = $today['mday']; if ($today['mon'] < 10) $month = "0" .$today['mon']; else $month = $today['mon']; $dateJour = $day . "/" . $month . "/" . $today['year']; } public function displayForm() { $defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT')); $sql = "SELECT count(*) as nb FROM `" . _DB_PREFIX_ . "belvg_CA_customerattributes_customer` WHERE id_belvg_customerattributes = 1 and value = '" . $dateJour . "' "; $this->results = Db::getInstance()->ExecuteS($sql); if ($this->results) { foreach ($this->results as $row) echo $row['dt_rdv'].' :: '.$row['nb'].'<br />'; } else echo "pas de data !"; } } ?> Lors de l'exécution de cette page (click sur mon onglet dans BACK-OFFICE), j'ai le message suivant : BAD SQL QUERY La requête est correcte (testée sous phpMyAdmin). si vous avez une idée, je suis preneur !!! merci par avance Fabrice 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