Hello, I am creating a BOT of fb and I need help, I need that along with the while of the database I need a for going from 1 to the last record. For the user to be able to send the corresponding code to the registry!
}elseif($text == "BONUS"){
$id_cl = $resexiste->id;
$existebonus = BD::conn()->prepare("SELECT * FROM 'bonus_attr' WHERE user_id = ? AND usado = ? ORDER by bonus_id desc");
$existebonus->execute(array($id_cl, "0"));
if($existebonus->rowCount() == 0){
enviaMSG($sender, "Não ha nenhum bonus atribuido a esta conta!");
}else{
enviaMSG($sender, "Envia o codigo correspondente ao bónus que queres usar:");
while($reseb = $existebonus->fetchObject()){
$titulo = $reseb->bonus_title;
enviaMSG($sender, $titulo);
}
}
}else{
enviaMSG($sender, "Syntax Invalida!");
}