[PHP-DB] Checking for ADO errors

2007-02-15 Thread Todd Cary
Is there a better way to check for ADO errors than what I have done here using the die()? $dbh = db_open($dbserver, $user, $password, $database) or die (Cannot open database); if ($dbh) { $stmnt = SELECT BadFieldName FROM MC; $rs = $dbh-Execute($stmnt) or die(Cannot execute

[PHP-DB] csv problem.. read csv from var

2007-02-15 Thread bedul
i have problem with reading csv.. for i know the example script i get was BASIC SCRIPT= $handle = fopen(hasillab.csv, r); $data2=$handle; while($data = fgetcsv($handle, 1000, ,)){ foreach($data as $str) $data2.=br= .$str; } the result was:

Re: [PHP-DB] csv problem.. read csv from var

2007-02-15 Thread Niel Archer
hi the problem i have is.. how about the csv is a var DATA=== $csv= A507257,3/2/2007,\Hematologi Lengkap,Cholesterol Total,LDL Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali