function process_db_requirements($module_info) { global $db; $db_add_table = $module_info['db_add_table']; if (is_array($db_add_table)) { foreach ($db_add_table as $table_to_add) { //print_r($field_to_add); if (!check_if_table_exists($table_to_add['name'])) { $db->query($table_to_add['sql']); } } } $db_add_field = $module_info['db_add_field']; if (is_array($db_add_field)) { foreach ($db_add_field as $field_to_add) { //print_r($field_to_add); module_db_add_field($field_to_add[0], $field_to_add[1], $field_to_add[2], $field_to_add[3], $field_to_add[4], $field_to_add[5], $field_to_add[6]); } } $db_SQL = $module_info['db_sql']; if (is_array($db_SQL)) { foreach ($db_SQL as $sql) { //print_r($field_to_add); //echo $sql; $db->query($sql); } } }
function process_db_requirements($module_info) { $db_add_field = $module_info['db_add_field']; if (is_array($db_add_field)) { foreach ($db_add_field as $field_to_add) { //print_r($field_to_add); module_db_add_field($field_to_add[0], $field_to_add[1], $field_to_add[2], $field_to_add[3], $field_to_add[4], $field_to_add[5], $field_to_add[6]); } } }