[FX.php List] Editing a found value

Log-Out log-out at yacobi.com
Fri Oct 22 03:05:58 MDT 2004


I use to have an special  field in all my databases: a calculation  
field = Status(CurrentRecID), so I always can get the -recordid of any  
record.

Log-Out
Spain

El 22/10/2004, a las 10:03, Louie Miranda escribió:

> BTW, i also found this link.
>
> http://www.fmforums.com/threads/showflat.php? 
> Cat=0&Number=121484&Main=121437
>
> it might be useful to someone someday.
>
>
> On Fri, 22 Oct 2004 16:02:26 +0800, Louie Miranda <lmiranda at gmail.com>  
> wrote:
>> Ahh so thats how i'll get the -recordid
>>
>> foreach ($data1['data'] as $key => $value) {
>> $currentRecord = strtok($key,'.');
>> }
>>
>> my apology on the $GF_Datetime, its actually a date() value, i forgot
>> to include it.
>>
>> thanks again!
>>
>>
>>
>> On Fri, 22 Oct 2004 17:38:07 +1000, Steve Winter
>> <steve at bluecrocodile.co.nz> wrote:
>>>
>>> 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




More information about the FX.php_List mailing list