-- -- Great Links -- -- http://www.xaprb.com/blog/2006/04/26/sql-coding-standards/ -- http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/ -- http://www.electrictoolbox.com/article/mysql/cross-table-delete/ -- SELECT * FROM drupal_menu_router WHERE path IN ('node/add','node/%','node') ORDER BY fit DESC LIMIT 0, 1 SELECT * FROM drupal_menu_router WHERE path IN ('admin') ORDER BY fit DESC LIMIT 0, 1 -- -- Corona Beach Getaway SQL -- -- -- Setup the High Scores Data -- -- SELECT GamerID, FacebookID, FacebookName FROM challenge_user -- AND TotalScore FROM challenge_score -- WHERE Score GamerID equals $scoreQuery = "SELECT U.id AS id, U.fb_id AS fb_id, U.fb_name AS name, SUM(S.score) AS score FROM `challenge_score` AS S, `challenge_user` AS U WHERE U.id = S.user_id GROUP BY U.id"; $friendsScoreQuery = "SELECT U.id AS id, U.fb_id AS fb_id, U.fb_name AS name, SUM(S.score) AS score FROM challenge_friend AS F, challenge_user AS U, challenge_score AS S WHERE F.user_id = {$userId} AND F.friend_id = U.fb_id AND S.user_id = U.id GROUP BY U.id LIMIT 4"; SELECT COUNT(id) FROM `challenge_user` WHERE `gender` = 'm'; SELECT COUNT(id) FROM `challenge_user` WHERE `gender` = 'f'; SELECT COUNT(id) FROM `challenge_user` WHERE `gender` = '-'; -- -- Gender Count -- SELECT gender, COUNT(gender) AS count FROM `challenge_user` GROUP BY gender; SELECT challenge_friend.* FROM challenge_friend INNER JOIN challenge_friend AS F, challenge_user AS U WHERE U.fb_id = 604922761 AND F.user_id = U.id; SELECT challenge_score.* FROM challenge_score INNER JOIN challenge_score AS S, challenge_user AS U WHERE U.fb_id = 604922761 AND S.user_id = U.id; DELETE FROM challenge_friend.* INNER JOIN challenge_friend AS F, challenge_user AS U WHERE U.fb_id = 604922761 AND F.user_id = U.id; -- Doesn't work on MySQL 5.1? DELETE FROM challenge_score.* INNER JOIN challenge_score AS S, challenge_user AS U WHERE U.fb_id = 604922761 AND S.user_id = U.id; -- Doesn't work on MySQL 5.1? -- -- Delete All User Info -- DELETE FROM challenge_friend WHERE user_id = (SELECT id FROM challenge_user WHERE fb_id = 604922761); -- SubSelect is very slow but fine for this. DELETE FROM challenge_score WHERE user_id = (SELECT id FROM challenge_user WHERE fb_id = 604922761); -- SubSelect is very slow but fine for this. DELETE FROM challenge_log WHERE fb_id = 604922761; DELETE FROM challenge_request WHERE fb_uid = 604922761; DELETE FROM challenge_user WHERE fb_id = 604922761; DELETE FROM picked_winner WHERE fb_id = 604922761; DELETE FROM challenge_user WHERE fb_id = 604922761; SELECT * FROM `challenge_user` WHERE `fb_id` = 604922761; SELECT * FROM `challenge_log` WHERE `fb_id` = 604922761; SELECT Friend.* FROM challenge_friend AS Friend, challenge_user AS User WHERE User.fb_id = 604922761 AND User.id = Friend.user_id LIMIT 300; $friendsQuery = "SELECT * FROM challenge_friend AS F, challenge_user AS User WHERE User.fb_id = ".FB_USER_ID." AND User.id = F.user_id AND updated > {$twentyFourHoursAgo} LIMIT 200;"; ACTION: Deleted User ID 30 from DB ACTION: Cleared all cookies for http://www.beachgetawaygames.com/facebook/games/ http://apps.facebook.com/beachgetawaygames/ http://www.facebook.com/corona?sk=app_209984832351386&a ACTION: Clicked FB Bookmark RESULT: Blank iframe JAVASCRIPT CONSOLE: Unsafe JavaScript attempt to access frame with URL http://www.facebook.com/corona?sk=app_209984832351386 from frame with URL http://static.ak.fbcdn.net/connect/xd_proxy.php?version=0#cb=f1f616d6e8&origin=http%3A%2F%2Fwww.beachgetawaygames.com%2Ff1b125794&relation=top.frames%5Bapp_runner_4dc9a96ae6ad20112976526%5D&transport=postmessage&type=pageInfo.update&clientWidth=1657&clientHeight=1323&scrollLeft=0&scrollTop=0&offsetLeft=0&offsetTop=0. Domains, protocols and ports must match. xd_proxy.php:93 Uncaught TypeError: Cannot call method 'postMessage' of undefined ACTION: Hit http://www.facebook.com/corona?sk=app_209984832351386&ajaxpipe=1 RESULT: Redirected to http://www.facebook.com/ ACTION: Logged Into Facebook RESULT: Redirected to http://www.facebook.com/corona?sk=app_209984832351386 Blank iframe ACTION: Clicked FB Bookmark RESULT: Got App Splash Page ACTION: Checked Agree and Clicked Begin Button RESULT: Login Popup blank JAVASCRIPT CONSOLE: Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/dialog/permissions.request?access_token=209984832351386%7C2.upxACXUmbvzdKhaL3wAWbQ__.3600.1305072000.1-604922761%7CeVl8brUUvdI2UgAEzZkjdvv1yGU&api_key=209984832351386&app_id=209984832351386&display=popup&fbconnect=0&locale=en_US&method=permissions.request&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D0%23cb%3Df3ebb524f%26origin%3Dhttp%253A%252F%252Fwww.beachgetawaygames.com%252Ff3b0a4d658%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df1a5069c38%26result%3D%2522xxRESULTTOKENxx%2522&perms=email&return_session=1&sdk=joey&session_version=3 from frame with URL http://www.beachgetawaygames.com/facebook/games/#. Domains, protocols and ports must match. 246 Unsafe JavaScript attempt to access frame with URL http://static.ak.fbcdn.net/connect/xd_proxy.php?version=0#cb=f3ebb524f&origin=http%3A%2F%2Fwww.beachgetawaygames.com%2Ff3b0a4d658&relation=opener&transport=postmessage&frame=f1a5069c38&result=%7B%22perms%22%3A%22email%22%2C%22selected_profiles%22%3A604922761%2C%22session%22%3A%22%7B%5C%22session_key%5C%22%3A%5C%222.upxACXUmbvzdKhaL3wAWbQ__.3600.1305072000.1-604922761%5C%22%2C%5C%22uid%5C%22%3A%5C%22604922761%5C%22%2C%5C%22expires%5C%22%3A1305072000%2C%5C%22secret%5C%22%3A%5C%22W8xLXOK7B4PFdl_WyUKnKA__%5C%22%2C%5C%22base_domain%5C%22%3A%5C%22beachgetawaygames.com%5C%22%2C%5C%22access_token%5C%22%3A%5C%22209984832351386%7C2.upxACXUmbvzdKhaL3wAWbQ__.3600.1305072000.1-604922761%7CeVl8brUUvdI2UgAEzZkjdvv1yGU%5C%22%2C%5C%22sig%5C%22%3A%5C%228071e0714b38d7dbbd340ff3ee540860%5C%22%7D%22%7D from frame with URL http://www.beachgetawaygames.com/facebook/games/#. Domains, protocols and ports must match. ALERT: The Page at www.beachgetawaygames.com says: You must ACTION: Clicked Alert OK Button RESULT: No change ACTION: Clicked Begin Button. Agree checkbox still checked. RESULT: Same result as prior. ACTION: