Jump to content

SELECT sur DB limit 1


Recommended Posts

Bonjour,

 

je fais un SELECT sur ma DB comme ceci

 

$sql = "SELECT *
FROM xxx
INNER JOIN xxx ON xxx = xxx
WHERE xxx = x
AND xxx = x";
 
$variable = Db::getInstance()->getValue($sql);
 
et quand je fais un var_dump($variable), il ne me retourne qu'un seul résultat alors qu'il devrait m'en retourner plus ...
 
Une solution ? :)
 
Merci d'avances :)
Link to comment
Share on other sites

Bonjour,

 

getValue() ne vous retournera en effet qu'une seule et unique valeur.

 

getRow() vous retournera un array() correspondant aux champs de votre table.

 

ExecuteS() vous retournera un array() multi-dimensions, comportant un ensemble d'array équivalent à getRow(), en gros.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...