note 81027 deleted from function.dbase-replace-record by cmb

From: Date: Sat, 06 Aug 2016 14:22:35 +0000
Subject: note 81027 deleted from function.dbase-replace-record by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-206222@lists.php.net to get a copy of this message
Note Submitter: 3Famous at gmail dot com ---- Actually you have to change the read array from key based to element (numeric) based and everything works correctly! <?php $db = dbase_open( "yourfile.dbf", 2); // 0=RO, 1=WO, 2=RW if ($db) { $row = dbase_get_record_with_names($db, 1); unset($row["deleted"]); // drop the field // do whatever it is you want to the $row["elements"] // then convert to numeric to store: $rarr = array(); foreach ($row as $i=>$vl) $rarr[] = $vl; dbase_replace_record($db, $rarr, 1); dbase_close($db); } ?> That code actually works!

« previous php.notes (#206222) next »