Here is my request:
Code: Select all
$query = $bdd->getQuery(true);
$cond="a.clef= PASSWORD('".$_POST['form']['identifiant']."')";
$query
->select(array('a.ref', 'b.Nom', 'b.Prenom','c.Email'))
->from($bdd->quoteName('#__XXXIDlecon', 'a'))
->join('INNER', $bdd->quoteName('#__XXXmembres', 'b') . ' ON ' . $bdd->quoteName('a.ref') . ' = ' . bdd->quoteName('b.Ref'))
->join('INNER', $bdd->quoteName('#__XXXcontacts', 'c') . ' ON ' . $bdd->quoteName('a.ref') . ' = ' . $bdd->quoteName('c.Membre'))
->where($cond);
$bdd->setQuery($query);
$result = $bdd->loadAssoc();
But if I go to my data base with phpmyadmin and I run this request I have a result
here is the equivalent of the request in sql
Code: Select all
SELECT a.ref, b.Nom,b.Prenom,c.Email from yyy000_XXXIDlecon as a
INNER join yyy000_XXXmembres AS b ON a.ref = b.Ref
INNER join yyy000_XXXcontacts as c ON a.ref = c.Membre
WHERE a.clef= PASSWORD('mdp');