June 7, 200421 yr To do a FMEdit() on a record I need the RecordID, I have tried the following script for this, but no luck so far. -------------------- $ProductQuery = new FX( $serverIP, $serverPort); $ProductQuery->SetDBData("personligweb.fp5", "www_publish"); $ProductQuery->AddDBParam('personal::brukernavn',$brukernavn,'eq'); $ReturnedData = $ProductQuery->FMFind(); foreach ($ReturnedData["data"] as $row) { $recordPointers = explode('.',$row); $currentRecord = $recordPointers[0]; $currentModified = $recordPointers[1]; } ---------------- I only get these error meassages: Unkown error type: [8] Array to string conversion Unkown error type: [8] Undefined offset: 1 Would be glad of any help.
June 7, 200421 yr Hi, Maxell! I am way out of my depth here and not yet familiar w/FX but we had what might be somewhat similar errors (iffy enough?) when upgraded PHP to a newer version that required initialization of variables... primarily, I think, in functions. I think it was around PHP 4.3.2 but I could be wrong... Anyway, the old PHP was fast and loose w/variables but the newer version(s) are more strict. Just a guess, but look into that. I can't remember if assigning a value is good enough or if you have to VAR it. I think arrays were a special case, but the others won't let you assign values until they are defined. I'm only just learning PHP, though, so I could be way off base here, too. --ST
July 6, 200421 yr Why don't you just create a field called recid in FM, as a calc that equals the recordid, and use that? It's so much easier than the crazy arrays you have to explode and parse just to the record id.
July 6, 200421 yr Why don't you just create a field called recid in FM, as a calc that equals the recordid, and use that? It's so much easier than the crazy arrays you have to explode and parse just to the record id. Sounds good to me! --ST
Create an account or sign in to comment