Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MySQLi function using Array
- function AdminUsersDetails1($dbc){
- $myArr=array();
- $sql = "SELECT first, last, email,status FROM adminusers;";
- $result = mysqli_query($dbc,$sql);
- $row_count = $result->num_rows;
- //echo $row_count;
- if($row_count !== 1){
- echo "Error in query";
- }
- $rows = array();
- $row = $result->fetch_assoc();
- $rows[] = $row["first"];
- $rows[] = $row["last"];
- $rows[] = $row["email"];
- $rows[] = $row["status"];
- return $rows;
- }
Advertisement
Add Comment
Please, Sign In to add comment