Advertisement
Guest User

Untitled

a guest
Nov 14th, 2016
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. My users table:
  2. id |username |Phone |email |role
  3. 1 | Girish |9834343468|girish@yahoo.com |admin
  4. 2 | Rakesh |9434343432|rakesh@gmail.com |admin
  5. 3 | Suresh |9434343772|suresh@gmail.com |developer
  6.  
  7. checks table:
  8.  
  9. id | userid | username | admin_id |order_id |exam |
  10. 1 | 3 | suresh | 1 | df54545454fg09|
  11. 2 | 3 | suresh | 1 | df54545454fg09|
  12. 3 | 3 | suresh | 2 | gh54995454fg55|
  13.  
  14. I need a sql query where atleast one "admin_id" of checks table contain users table "id"
  15. I want to create a table like this
  16. id|admin_id|name |email |Phone
  17. 1 | 1 |Girish |girish@gmail.com |9834343468
  18. 2 | 2 |Rakesh |rakesh@gmail.com |9434343432
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement