Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- users table structure
- ...........................................................................
- id email u_firstname status(0=inactive,1=active)
- ...........................................................................
- 1 varunjoshi919@gmail.com varun 1
- 2 abc@gmail.com abc 0
- SELECT `id`,`email`,`u_firstname`,case u_status when '0' then 'inactive' when '1' then 'active' end as status FROM `users`
- ...........................................................................
- id email u_firstname status(0=inactive,1=active)
- ...........................................................................
- 1 varunjoshi919@gmail.com varun active
- 2 abc@gmail.com abc inactive
- ...........................................................................
- id email u_firstname status(0=inactive,1=active)
- ...........................................................................
- 1 varunjoshi919@gmail.com varun active
- SELECT `id`,`email`,`u_firstname`,case u_status when '0' then 'inactive' when '1' then 'active' end as status FROM `users` where `u_status` like 'ac%'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement