Mysql query to check day of week with timestamp
MYSQL Query with Subquery, 'IF' AND JOIN
SELECT mu.user_id, mu.username, mu.firstname, mu.lastname, ac.dob, ac.state, ac.zip, ac.homephone, if( c.class = 'owner', (
SELECT GROUP_CONCAT( sm.username )
FROM MASTER_USER sm
INNER JOIN circles sc ON ( sm.user_id = sc.user_id
AND sc.class = 'member' )
WHERE sc.circle_id = c.circle_id
AND sm.is_deleted = '0' ) , if( c.class = 'member', mu.username, '' )
FROM `master_user` AS mu
INNER JOIN accounts AS ac ON ( mu.user_id = ac.user_id )
LEFT JOIN circles AS c ON ( mu.user_id = c.user_id )
WHERE mu.is_deleted = '0'
GROUP BY mu.user_id
How to enable mod rewrite in wamp ?
- Find the 'httpd.conf' file under the 'conf' folder inside the Apache's installation folder.
Ex: C:\wamp\bin\apche*.*\conf\httpd.conf
- Find the following line '#LoadModule rewrite_module modules/mod_rewrite.so' in the 'httpd.conf' file.You can do this easily by searching the keyword 'mod_rewrite' from find menu.
- Remove the '#' at the starting of the line
- Now restart the apache server.
- You can see now 'mod_rewrite' in the Loaded Module section while doing 'phpinfo()'.