note 49911 modified in function.dbase-replace-record by felipe
| From: | felipe@php.net | Date: | Sun, 18 Jan 2009 17:09:47 +0000 |
| Subject: | note 49911 modified in function.dbase-replace-record by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149387@lists.php.net to get a copy of this message | ||
The dbase add and replace functions do NOT like to use the associative array.
<?php
//This gives "unspecified error" on replace and add:
$row = dbase_get_record_with_names($db, 1);
unset($row['deleted']);
dbase_replace_record($db, $row, 1);
dbase_add_record($db, $row);
//To further prove the point,
//The first add works, the second one fails:
$testrow1=array('one','2','three');
dbase_add_record($db,$testrow1);
$testrow2=array('FIELDA' => 'xxx','FIELDB' =>
'9','FIELDC' => 'yyyyy');
dbase_add_record($db,$testrow2);
?>
--was--
The dbase add and replace functions do NOT like to use the associative array.
<?
//This gives "unspecified error" on replace and add:
$row = dbase_get_record_with_names($db, 1);
unset($row['deleted']);
dbase_replace_record($db, $row, 1);
dbase_add_record($db, $row);
//To further prove the point,
//The first add works, the second one fails:
$testrow1=array('one','2','three');
dbase_add_record($db,$testrow1);
$testrow2=array('FIELDA' => 'xxx','FIELDB' =>
'9','FIELDC' => 'yyyyy');
dbase_add_record($db,$testrow2);
?>
http://php.net/manual/en/function.dbase-replace-record.php