*/
public static function checkIfFieldExists($tableName, $columnName) {
$result = CRM_Core_DAO::executeQuery(
- "SHOW COLUMNS FROM $tableName LIKE ' %1 '",
+ "SHOW COLUMNS FROM $tableName LIKE %1",
array(1 => array($columnName, 'String'))
);
if ($result->fetch()) {
public function columnTests() {
$columns = array();
$columns[] = array('civicrm_contribution', 'total_amount');
- $columns[] = array('civicrm_contact', 'from_name');
+ $columns[] = array('civicrm_contact', 'first_name');
$columns[] = array('civicrm_contact', 'xxxx');
return $columns;
}