Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $s = $bot->getMessage()->getText();
- $s = $bot->removeracentos($s);
- $con = $bot->conexao();
- $result = $bot->executaquery($s, $con);
- $count = mysqli_num_rows($result);
- switch ($count) {
- case ($count > 1):
- $bot->reply('Serão listadas mais de uma resposta a sua dúvida');
- while($dados=mysqli_fetch_assoc($result))
- {
- //$bot->typesAndWaits(2);
- $bot->reply($dados['resposta']);
- }
- break;
- case ($count = 1):
- while($dados=mysqli_fetch_assoc($result))
- {
- //$bot->typesAndWaits(2);
- $bot->reply($dados['resposta']);
- }
- break;
- default:
- $bot->reply('Desculpe, não entendi a sua dúvida.');
- }
- mysqli_free_result($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement