Skip to content

Instantly share code, notes, and snippets.

@rafaelaugustos
Created June 13, 2016 21:55
Show Gist options
  • Save rafaelaugustos/0fd764ddfe28daf0ce145c69bf5cb628 to your computer and use it in GitHub Desktop.
Save rafaelaugustos/0fd764ddfe28daf0ce145c69bf5cb628 to your computer and use it in GitHub Desktop.
$manager = $pdo->prepare("SELECT * FROM `manager` WHERE `id_user` = :id");
$manager->bindValue(":id", $ln->user_id, PDO::PARAM_INT);
$manager->execute();
$retorno['manager'] = '';
if($manager->rowCount() > 0){
$x = 0;
while($rs = $manager->fetchObject()){
$retorno['manager'] .= $rs->id_artist;
$x++;
if($x < $manager->rowCount()){
$retorno['manager'] .= ',';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment