Hi.
I have automated the attribute_ field creation in the following way:
$fields = mysql_list_fields($DB, $token_table_name);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$field_array[] = mysql_field_name($fields, $i);}
if (!in_array("attribute_1", $field_array)) {
mysql_query("ALTER TABLE " . $token_table_name . "
ADD attribute_1 varchar(100) default NULL;");
}
if (!in_array("attribute_2", $field_array)) {
mysql_query("ALTER TABLE " . $token_table_name . "
ADD attribute_2 varchar(100) default NULL;");
}
The SPSS function works just fine. It exports the extra token fields.
Hope this is helpful.