Quantcast
Viewing all articles
Browse latest Browse all 30

$sodapop->database->getUserDataById($id)

getUserDataById($id) acceptes the user's ID number and pulls all of their user data based on that. 
Parameters: $id - the user's ID number.
Location: model.sodapop.php

public function getUserDataById($id) {

$query = " select *
from app_user_users
where id = '$id'";
$result = $this->getData($query);
while ($row= mysql_fetch_array($result, MYSQL_ASSOC)) {

$userData['id'] = $row['id'];
$userData['name'] = $row['name'];
$userData['email'] = $row['email'];
$userData['username'] = $row['username'];
$userData['accessLevel'] = $row['accessLevel'];
}

return $userData;
}

Viewing all articles
Browse latest Browse all 30

Trending Articles