Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Import a flatfile using phpMyAdmin

Quote Reply
Import a flatfile using phpMyAdmin
We use DBMan (flatfile version) to manage a service for clinicians (University-based service). The data file approaches 3000 records and over 3 MB. Because of the risk of file corruption, we want to upgrade to the sql version. We installed ver 1 on the server (still not working perfectly but we work on it), and we soon need to import the data.

I have no experience with mysql, and would appreciate some help. In the dbman cfg file, the data is defined as seen below. Should I prepare a table first (we use phpMyAdmin - PMA) to hold the data, or is there a way to prepare the flatfile in a way that PMA will recognise the fields and will import the data correctly?

If you have experience with PMA, I will appreciate also help with how to practically do it in PMA.

Thanks,

Amir.

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
inq_title => [1, 'alpha', 6, 255, 0, '', ''],
inq_name => [2, 'alpha', 40, 255, 0, '', ''],
inq_inst => [4, 'alpha', 40, 255, 0, '', ''],
inq_clinic => [5, 'alpha', 40, 255, 0, '', ''],
inq_email => [6, 'alpha', 40, 255, 0, '', ''],
inq_tel => [7, 'alpha', 10, 25, 0, '', ''],
inq_fax => [8, 'alpha', 10, 25, 0, '', ''],
qry_urgency => [9, 'alpha', 0, 255, 0, '', ''],
qry_gender => [10, 'alpha', 0, 60, 0, '', ''],
qry_age => [11, 'alpha', 5, 5, 0, '', ''],
qry_weight => [12, 'alpha', 3, 3, 0, '', ''],
qry_medication => [13, 'alpha', 40x3, 2048, 0, '', ''],
qry_question => [14, 'alpha', 40x3, 9048, 0, '', ''],
qry_type1 => [20, 'alpha', 40, 255, 0, '', ''],
qry_type2 => [21, 'alpha', 40, 255, 0, '', ''],
qry_date => [26, 'alpha', 10, 20, 0, &get_date, ''],
res_ans => [15, 'alpha', 40x3, 9048, 0, '', ''],
res_ref => [16, 'alpha', 40x3, 9048, 0, '1. <br>2. <br>3. <br>', ''],
res_name => [17, 'alpha', 40, 255, 0, '', ''],
res_email => [18, 'alpha', 40, 255, 0, '@utu.fi', ''],
res_tel => [19, 'alpha', 10, 25, 0, '', ''],
drgline_ref => [22, 'alpha', 6, 255, 0, '', ''],
keywords => [23, 'alpha', 40, 255, 0, '', ''],
spec_pri => [24, 'alpha', 0, 60, 0, '', ''],
spec_sec => [25, 'alpha', 0, 255, 0, '', ''],
res_date => [27, 'alpha', 10, 20, 0, &get_date, ''],
meeting_date => [28, 'alpha', 10, 20, 0, &get_date, ''],
res_prep_time => [29, 'alpha', 5, 60, 0, '', ''],
res_summary => [30, 'alpha', 40, 1500, 0, '', ''],
status => [31, 'alpha', 10, 500, 0, '', ''],
diagnoses => [32, 'alpha', 40, 1000, 0, '', ''],
auth_user => [33, 'alpha', 40, 500, 0, '', ''],
user4 => [34, 'alpha', 40, 500, 0, '', ''],
user5 => [35, 'alpha', 40, 500, 0, '', ''],
user6 => [36, 'alpha', 40, 500, 0, '', '']

);
Subject Author Views Date
Post Import a flatfile using phpMyAdmin snapir 1962 Jan 31, 2007, 6:09 AM