Changeset 10866


Ignore:
Timestamp:
2005-11-08T11:32:09+13:00 (18 years ago)
Author:
jrm21
Message:

gave examples for CSV files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/etc/packages/example.dbi

    r8119 r10866  
    3434# Eg, for postgres, it is "DBI:Pg:dbname=<database>".
    3535# For mysql, it might look like "DBI:mysql:database=<database>;host=localhost"
    36 # Case is important!
     36# For the CSV (comma-separated values text-file) backend, try something like
     37#   'DBI:CSV:f_dir=/path/to/file;csv_quote_char=\";csv_sep_char=    '
     38# with an embedded tab character for tab-separated instead of the
     39# default comma-separated.
     40# Case may be important!
    3741#
    3842#$db='';
     
    4852#
    4953#$sql_query = 'SELECT id, name,  data FROM table1 JOIN table2 WHERE something';
     54# For CSV, the table name is the file name. Eg:
     55#$sql_query = 'SELECT * FROM values.txt'
     56# CSV may also require DOS '\r\n'-style line endings instead of unix '\n'.
    5057
    5158
Note: See TracChangeset for help on using the changeset viewer.