Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. **users**
  2. user_id | user_email | user_role | dashboard_id
  3. 1 | admin@admin.com | 0 | 1
  4. 1 | user@user.com | 1 | 2
  5. ---------------------------------------------------
  6.  
  7. **dashboards**
  8. dashboard_id | dashboard_name |
  9. 1 | dashboard 1
  10. 1 | dashboard 2
  11. ---------------------------------------------------
  12.  
  13. **roles**
  14. role_id | role_name |
  15. 0 | super_admin
  16. 1 | user
  17. ---------------------------------------------------
  18.  
  19. function clientReportName() {
  20. global $conn;
  21. global $dashboardIdNew;
  22. global $user_dash_id;
  23.  
  24. $sql = "SELECT * FROM dashboards WHERE dashboard_id = $user_dash_id";
  25. $result = $conn->query($sql);
  26.  
  27. if($result->num_rows > 0){
  28. while($row = $result->fetch_assoc()){
  29. echo $row["dashboard_name"];
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement