Maxell Posted June 7, 2004 Posted June 7, 2004 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.
Steve T. Posted June 7, 2004 Posted June 7, 2004 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
Jim McNeely Posted July 6, 2004 Posted July 6, 2004 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.
Steve T. Posted July 6, 2004 Posted July 6, 2004 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
Recommended Posts
This topic is 7515 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now