mysql: import csv data

by prettyscripts on 2011-12-16 10:47:00 • Leave a comment »

sql

there are a few ways to to it. here's a solution using load data. load data local infile '/path/to/csvfile' fields terminated by ',' enclosed by '"' lines terminated by '\n' [ignore 1 lines] [(column_1, @dummy, column_2,...)] notes line 5: t… more »

Tags: csv, data, import, mysql, sql

symfony: database to fixture data

by prettyscripts on 2009-05-30 14:33:00 • Leave a comment »

symfony

while developing a symfony project, it's usually required to rebuild database and reload data constantly with 'symfony doctrine:build-all' or 'symfony doctrine:build-all-load' constantly. when this is run, test data are wiped. the easy way is to have i… more »

Tags: data, database, dump, export, fixtures, framework, import, symfony

fetching data from remote site

by prettyscripts on 2008-05-13 21:29:17 • Leave a comment »

miscphpcode

using cURL functions:$c = curl_init();curl_setopt_array($c, $opts); $data = curl_exec($c); $info = curl_getinfo($c);$error = curl_error($c);curl_close($c);line 2: see next section on $optline 3: data will be returned if CURLOPT_RET… more »

Tags: curl, data, php

smf: import data from one site to another

by prettyscripts on 2008-01-25 11:27:27 • Leave a comment »

smf

this is not a tutorial on how to do it, but rather a note on how to fix a the correct location of themes after data is imported. this is provided the sites are on the same server. for cases such as, using live or production data at another site for testi… more »

Tags: data, export, import, smf