Skip to content

Commit

Permalink
worked on #22
Browse files Browse the repository at this point in the history
providing info at login now.
  • Loading branch information
guptaaditya13 committed Jan 6, 2016
1 parent 4a5aad0 commit 9df938a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function getUserLoginInfo($id,$conn){
* @return array index 0 is 1 or -1, index 1 is array or string.
*/
public function getEvents($id, $conn){
$sql = " SELECT eveId FROM Registration WHERE pId = $id";
$sql = "SELECT Events.eveName FROM Registration INNER JOIN Events ON Registration.eveId = Events.eveId AND Registration.pId = $id";
$result = mysqli_query($conn, $sql);
if(!$result){
$arr = array();
Expand All @@ -220,7 +220,7 @@ public function getEvents($id, $conn){
$arr = array();
$results = array();
while($row = mysqli_fetch_assoc($result)){
$results[] = $row['eveId'];
$results[] = $row['eveName'];
}
$arr[]=1;
$arr[] = $results;
Expand Down

0 comments on commit 9df938a

Please sign in to comment.