Commit 3e3e12dd authored by kainuk's avatar kainuk
Browse files

Merge branch 'drupalqueryfixes' into 'master'

Fix database table prefixing for query

See merge request !2
parents d411e8ed 82e248c4
......@@ -25,7 +25,7 @@ class CRM_WebformCivirules_Condition_Form_WebformIs extends CRM_CivirulesConditi
$nodes= array();
$query = db_query("SELECT n.nid, n.title FROM webform_civicrm_forms INNER JOIN node n ON webform_civicrm_forms.nid = n.nid");
$query = db_query("SELECT n.nid, n.title FROM {webform_civicrm_forms} wcf INNER JOIN {node} n ON wcf.nid = n.nid");
$result = $query->fetchAllAssoc('nid');
foreach($result as $node) {
$nodes[$node->nid] = $node->title . '(nid: '.$node->nid.')';
......@@ -75,4 +75,4 @@ class CRM_WebformCivirules_Condition_Form_WebformIs extends CRM_CivirulesConditi
parent::postProcess();
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment