note 81027 added to function.dbase-replace-record

From: Date: Mon, 11 Feb 2008 17:03:41 +0000
Subject: note 81027 added to function.dbase-replace-record
Groups: php.notes 
Request: Send a blank email to php-notes+get-136047@lists.php.net to get a copy of this message
Actually you have to change the read array from key based to element (numeric) based and everything works correctly! $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! --- Want to be famous? http://www.3famous.com/ - 100% PHP BABY! ---- Server IP: 208.69.120.35 Probable Submitter: 70.91.2.134 (proxied: 146.145.194.177) ---- Manual Page -- http://www.php.net/manual/en/function.dbase-replace-record.php Edit -- https://master.php.net/note/edit/81027 Del: integrated -- https://master.php.net/note/delete/81027/integrated Del: useless -- https://master.php.net/note/delete/81027/useless Del: bad code -- https://master.php.net/note/delete/81027/bad+code Del: spam -- https://master.php.net/note/delete/81027/spam Del: non-english -- https://master.php.net/note/delete/81027/non-english Del: in docs -- https://master.php.net/note/delete/81027/in+docs Del: other reasons-- https://master.php.net/note/delete/81027 Reject -- https://master.php.net/note/reject/81027 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136047) next »