Changeset 10924
- Timestamp:
- 2005-11-23T12:25:36+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/etc/packages/example.dbi
r10866 r10924 31 31 32 32 # Data Source. 33 # This is going to be dependent on which back-end you use. 33 # This is going to be dependent on which back-end you use. Note that these 34 # strings are case-sensitive. 34 35 # Eg, for postgres, it is "DBI:Pg:dbname=<database>". 35 36 # For mysql, it might look like "DBI:mysql:database=<database>;host=localhost" … … 37 38 # 'DBI:CSV:f_dir=/path/to/file;csv_quote_char=\";csv_sep_char= ' 38 39 # with an embedded tab character for tab-separated instead of the 39 # default comma-separated. 40 # Case may be important! 41 # 42 #$db=''; 40 # default comma-separated.$db=''; 43 41 44 42 # If you need a username and password to connect to this database, … … 48 46 #$password=''; 49 47 48 # DBI does not allow you to use multiple SQL statements at once. So if 49 # you want to execute two statements (for example, to prep the data by 50 # creating a temporary table), uncomment and use this as the first statement. 51 #$sql_query_prime = 'CREATE TEMP TABLE foo AS 52 # SELECT t1.ID, t2.name 53 # FROM table1 AS t1 JOIN table2 AS t2 54 # ON t1.ID = t2.ID '; 55 50 56 # sql query required to get your rows out of the database. Each row will 51 57 # become a separate greenstone document. 52 58 # 53 #$sql_query = 'SELECT id, name, data FROM table1JOIN table2 WHERE something';59 #$sql_query = 'SELECT id, name, data FROM foo JOIN table2 WHERE something'; 54 60 # For CSV, the table name is the file name. Eg: 55 61 #$sql_query = 'SELECT * FROM values.txt' 56 62 # CSV may also require DOS '\r\n'-style line endings instead of unix '\n'. 63 # It is easier if your data file does not have a dot '.' in it, as that is 64 # not a valid character in an SQL table name (although it works for simple 65 # SELECTS but not joins). 57 66 58 67
Note:
See TracChangeset
for help on using the changeset viewer.