[FX.php List] Editing a found value

Steve Winter steve at bluecrocodile.co.nz
Fri Oct 22 01:38:07 MDT 2004


Afternoon...

The issue here is that you don't ever set a value to $currentRecord, so the
-recID that gets passed to the db is (probably NULL, or undefined or
something of the sort...so what you're going to need to do is find out the
recordID from the first query.. (I've added a line to your code below) in a
similar line of thought, you don't seem to define the variable $GF_Datetime,
which is going to result in AccessDate ending up empty...

Cheers
Steve

> //find
> $query = new FX("192.168.0.90", "8080");
> $query -> SetDBData("Agencies.fp5", "AllFields");
> $query -> AddDBParam('Filename', $catchfile);
> $data1 = $query->FMFind();

foreach ($data1['data'] as $key => $value){$currentRecord = strtok($key,
'.');}
 
> print("<pre>");
> print_r($data1);
> print("</pre>");
> 
> and try to edit it afterwards, but this one returns an error 
> of 101 (missing record)
> 
> //edit
> $query = new FX("192.168.0.90", "8080");
> $query -> SetDBData("Agencies.fp5", "AllFields");
> $query -> AddDBParam('-recid', $currentRecord);
> $query -> AddDBParam('AccessDate', $GF_Datetime);
> $data2 = $query->FMEdit();
> 
> print("<pre>");
> print_r($data2);
> print("</pre>");
> 
> 
> how do i edit a found row?
> 
> -- 
> Louie Miranda
> http://www.axishift.com 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org 
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 





More information about the FX.php_List mailing list