Created
December 21, 2020 15:30
-
-
Save AlphaRomeoMike/0ef60bd2a425b7fb94b205474926e1f7 to your computer and use it in GitHub Desktop.
Select for API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "connection.php"; | |
$query = "CALL st_getUser()"; | |
$response = array(); | |
$res = mysqli_query($con, $query); | |
if(mysqli_num_rows($res)) { | |
while($row = mysqli_fetch_assoc($res)) { | |
$response[] = $row; | |
} | |
} else { | |
$response["msg"] = "No records"; | |
} | |
echo json_encode($response); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment