/** * * This function checks if a value exsists for a cck field * * @param string $content_type_name machine readable name of the content type * * @param string $field_name machine readable name of field * * @param mixed $field_value value that needs to be checked * * @return boolean true if present, else false * */ function is_cck_field_value_present($content_type_name, $field_name, $field_value) { // first lets get field details $qs =<<type; // we need the type to determine the mysql type $inline_value = $row->db_storage; // inline values are those which are stored in the content type table } // the where param type for mysql comparisions $where_param_type = ""; switch($field_type) { case "text": $where_param_type = "'%s'"; break; case "number_integer": $where_param_type = "%d"; break; case "number_decimal": $where_param_type = "%f"; break; } if ($inline_value) { $qs =<<