Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @author Adriano Schneider
- * @copyright 2017
- */
- //
- $conexaoDB = mysqli_connect("localhost:3317", "root", "123456", 'android_rest');
- //
- $query = "select ID";
- $query .= " , NOME";
- $query .= " , EMAIL";
- $query .= " , CELULAR";
- $query .= " , STATUS";
- $query .= " from usuarios";
- $query .= " limit 0,10";
- $result = mysqli_query($conexaoDB,$query);
- $_qtdeRegistros = mysqli_num_rows($result);
- $lista = array();
- while ($row = mysqli_fetch_array($result)) {
- extract($row);
- $lista[] = array(
- "id" => $ID,
- "nome" => $NOME,
- "email" => $EMAIL,
- "celular" => $CELULAR,
- "status" => $STATUS
- );
- }
- mysqli_close($conexaoDB);
- //
- echo json_encode($lista);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement