Nasir Uddin January 27, 2015 No Comments

How to synchronize two mysql database schema?

To deploy your database change from local server to live server you can easily use this script. What can do this script? 1. Transfer new table from local database to database of live server. 2. Add new fields in existing table of database. To do this, first install Schema Sync a MySQL Schema Versioning and […]

Nasir Uddin February 25, 2014 No Comments

How to get Webform Submission data from Sid

Sometimes, we have to load webform submission of drupal from submission id (sid). If you have a sid, then you will get easily submission data from my below codes. [sourcecode language=”bash”] module_load_include(‘inc’,’webform’,’includes/webform.submissions’); $sid = 10; $submission = webform_get_submissions(array(‘sid’ => $sid)); $nid = $submission[$sid]->nid; $web_submission = webform_get_submission($nid, $sid); $node = node_load($nid); $output = webform_submission_render($node, $web_submission, NULL, […]

Nasir Uddin June 12, 2013 1 Comment

How to develop a custom exposed filter for node created date

Sometimes, we face drupal node filter by “This Month”, “Last Month”, “Current Year”. But how way we can solve this problem. Please follow below procedures… What query we have to use … For “This Month” [sourcecode language=”bash”] SELECT DISTINCT FROM_UNIXTIME(node.created, "%M") from node where node.type = ‘fund’ and node.created > UNIX_TIMESTAMP( LAST_DAY( DATE_SUB(NOW(), INTERVAL 1 […]