Ali Qureshi, is a web developer based in Lahore, Pakistan. Since 2001, Ali has developed creative, interactive, usable & successful web apps, Facebook apps, web portals and have authored WordPress plugins & themes. Ali has worked as a Software Architect, SEO Consultant, project manager, PHP & Flash AS3 developer, and sometimes as designer. He has also reviewed three books for Packt Publishing on jQuery and Mobile development. He is currently developing WordPress themes & Plugins and mobile apps APIs. When not working, he spends his time exploring and trekking.

Calculating MySQL Age from Date of Birth Column and Selecting Records Between Age Range

While developing a Facebook Dating app recently, I needed to return records for a date range between minimum and maximum age from users table but the data was in the date format (birthday). Following select command will calculate the age from the `birthday` column value for you for each record:   SELECT EXTRACT(YEAR FROM (FROM_DAYS(DATEDIFF(NOW(),`birthday`))))+0…

Get Facebook User’s Affiliations, Network Information Using Facebook Graph API

Facebook Graph API $me object does not provide user’s network info. To access FB user’s networks/affiliations information, you need to use FQL like this:   $fql = ‘SELECT affiliations, name FROM user WHERE uid = ‘.$me[’id’];   //or use this query for standard_user_info table //$fql = ‘SELECT affiliations, name FROM standard_user_info WHERE uid = ‘.$me[‘id’];…

PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() in osCommerce Store

During osCommerce store customization and add-on installation, if you get following error Cannot redeclare do_magic_quotes_gpc(): PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/user/public_html/butikk/includes/functions/compatibility.php:19) in /home/user/public_html/butikk/includes/functions/compatibility.php on line 3 This error is caused by copying of a module file into the languages “catalog/includes/languages/” folder by mistake during some add-on installation. Check all the files…