Hey Debbie,
I would like to have this "chain-feature" too ...
But I'm stuck at:
On or about line 3899, in the “function create_internal_table” section, add the following bold part:
My function create_internal_table looks like this:
(And as you can see, the part where I could add "type_field ENUM('text', ... " etc. is turned into comment line)
[pre]
/* 4.0 */
/*
function create_internal_table($table_internal_name)
// goal: drop (if present) the old internal table and create the new one.
// input: $table_internal_name
{
global $conn, $quote;
// drop the old table
$sql = "DROP TABLE IF EXISTS ".$quote.$table_internal_name.$quote;
$res_table = execute_db($sql, $conn);
// create the new one
$sql ="CREATE TABLE ".$quote.$table_internal_name.$quote." (
name_field varchar(50) NOT NULL default '',
label_field varchar(255) NOT NULL default '',
type_field ENUM('text','textarea','rich_editor','password','insert_date','update_date','date','select_single','generic_file','image_file','ID_user','unique_ID') NOT NULL default 'text',
content_field ENUM('alphabetic','alphanumeric','numeric','url','email','html','phone','city') NOT NULL DEFAULT 'alphanumeric',
present_search_form_field ENUM('0','1') DEFAULT '1' NOT NULL,
present_results_search_field ENUM('0','1') DEFAULT '1' NOT NULL,
present_details_form_field ENUM('0','1') DEFAULT '1' NOT NULL,
present_insert_form_field ENUM('0','1') DEFAULT '1' NOT NULL,
present_ext_update_form_field ENUM('0','1') DEFAULT '1' NOT NULL,
required_field ENUM('0','1') DEFAULT '0' NOT NULL,
check_duplicated_insert_field ENUM('0','1') DEFAULT '0' NOT NULL,
other_choices_field ENUM ('0','1') DEFAULT '0' NOT NULL,
select_options_field text NOT NULL default '',
primary_key_field_field VARCHAR(255) NOT NULL,
primary_key_table_field VARCHAR(255) NOT NULL,
primary_key_db_field VARCHAR(50) NOT NULL,
linked_fields_field TEXT NOT NULL,
linked_fields_order_by_field TEXT NOT NULL,
linked_fields_order_type_field VARCHAR(255) NOT NULL,
select_type_field varchar(100) NOT NULL default 'is_equal/contains/starts_with/ends_with/greater_than/less_then',
prefix_field TEXT NOT NULL default '',
default_value_field TEXT NOT NULL default '',
width_field VARCHAR(5) NOT NULL,
height_field VARCHAR(5) NOT NULL,
maxlength_field VARCHAR(5) NOT NULL default '100',
hint_insert_field VARCHAR(255) NOT NULL,
order_form_field smallint(6) NOT NULL,
separator_field varchar(2) NOT NULL default '~',
PRIMARY KEY (name_field)
) TYPE=MyISAM
";
$res_table = execute_db($sql, $conn);
} // end function create_internal_table
*/
/* 4.0 */
function create_internal_table($table_internal_name)
// goal: drop (if present) the old internal table and create the new one.
// input: $table_internal_name
{
global $conn;
$data_dictionary = NewDataDictionary($conn);
drop_table_db($conn, $data_dictionary, $table_internal_name);
$fields = "
id_field I NOTNULL PRIMARY AUTOINCREMENT,
name_field C(50),
label_field C(255) DEFAULT '' NOTNULL,
type_field C(50) DEFAULT 'text' NOTNULL,
content_field C(50) DEFAULT 'alphanumeric' NOTNULL,
present_search_form_field C(1) DEFAULT '1' NOTNULL,
present_results_search_field C(1) DEFAULT '1' NOTNULL,
present_details_form_field C(1) DEFAULT '1' NOTNULL,
present_insert_form_field C(1) DEFAULT '1' NOTNULL,
present_ext_update_form_field C(1) DEFAULT '1' NOTNULL,
required_field C(1) DEFAULT '0' NOTNULL,
check_duplicated_insert_field C(1) DEFAULT '0' NOTNULL,
other_choices_field C(1) DEFAULT '0' NOTNULL,
select_options_field X DEFAULT '' NOTNULL,
primary_key_field_field C(255) DEFAULT '' NOTNULL,
primary_key_table_field C(255) DEFAULT '' NOTNULL,
primary_key_db_field C(50) DEFAULT '' NOTNULL,
linked_fields_field X DEFAULT '' NOTNULL,
linked_fields_order_by_field X DEFAULT '' NOTNULL,
linked_fields_order_type_field X DEFAULT '' NOTNULL,
select_type_field C(100) DEFAULT 'is_equal/contains/starts_with/ends_with/greater_than/less_then/is_null/is_empty' NOTNULL,
prefix_field X DEFAULT '' NOTNULL,
default_value_field DEFAULT '' X NOTNULL,
width_field C(5) DEFAULT '' NOTNULL,
height_field C(5) DEFAULT '' NOTNULL,
maxlength_field C(5) DEFAULT '100' NOTNULL,
hint_insert_field C(255) DEFAULT '' NOTNULL,
order_form_field I NOTNULL,
separator_field C(2) DEFAULT '~' NOTNULL
)
";
create_table_db($conn, $data_dictionary, $table_internal_name, $fields);
} // end function create_internal_table
[/pre]
Could you tell me what I need to do here ... ?
Thanks in advance !