/var/log/step2k

July 10, 2006

Upload Csv Insert To MySql

Filed under: Project, MySQL, PHP - Salman Teguh @ 2:46 am

from : http://howto.indika.net.id/wikka.php?wakka=UploadCsvInsertToMySql
< ?php
//First we need to define our user pass and database name
$tbl = “yourtablename”;
$host=”yourdatabasehost”;
$user=”youruser”;
$pass=”yourpass”;
$database=”yourdatabase”;

//we need function to get the csv
function getcsv($filename, $delim =”,”){

$row = 0;
$dump = array(); //create new array for hold the data csv

$f = fopen ($filename,”r”);
$size = filesize($filename)+1;
while ($data = fgetcsv($f, $size, $delim)) {
$dump[$row] = $data; //put the data to array
//echo $data[1].”
“;
$row++;
}
fclose ($f);

return $dump;
}
(more…)

DotProject: JpGraph Error

Filed under: Project - Salman Teguh @ 2:45 am

from : http://www.dotproject.net/vbulletin/archive/index.php/t-2320.html

Open the file modules/tasks/gantt.php and change line 142 where it says “$graph->scale->SetDateLocale(some dotproject variable);”
to
“$graph->scale->SetDateLocale('’);”

Get free blog up and running in minutes with Blogsome
Theme designed by Alex King