From jason at stravinsoft.com Fri Oct 1 13:57:41 2004 From: jason at stravinsoft.com (Jason H.Awbrey) Date: Mon Oct 4 10:38:28 2004 Subject: [FX.php List] FileMaker's Return Character In-Reply-To: <004b01c4a56a$04674650$7bea0b45@mickeysq271eqy> References: <004b01c4a56a$04674650$7bea0b45@mickeysq271eqy> Message-ID: <2764EB79-13E4-11D9-AA26-000A9592DE20@stravinsoft.com> Hello All, I am currently trying to parse out a field that holds return-delimited values into an array. I was trying to use explode() but I can't figure out what the character is that FileMaker outputs as the return to use as the string separator. Does anyone on the list know what character FM is using for the return character? I tried copying the output and pasting it into BBEdit and it looks like ASCII code 13 (\r) but that doesn't seem to be working. Any help would be appreciated. Cheers, Jason H. Awbrey StravinSOFT, Incorporated http://www.stravinsoft.com From ggt667 at gmail.com Sat Oct 2 14:22:52 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Mon Oct 4 10:38:29 2004 Subject: [FX.php List] I just added an FX.php solution Message-ID: to keep track of the work that you guys have done, so that we can have a reference to what is possible with FX.php and to bring suggestion, hope and encouragement to develop new and exciting FX.php solutions. http://www.file-making.com/samples/add.php Please add your real email so that I can contact you directly, the email adress entered will not be publicly available. Gjermund G. Thorsen From ben at eldertreks.com Mon Oct 4 11:09:05 2004 From: ben at eldertreks.com (Ben Rollins) Date: Mon Oct 4 11:13:48 2004 Subject: [FX.php List] LinkNext issue Message-ID: Hi, I'm working on moving a travel site from CDML to FX.php, and I'm running into an issue with LinkNext. The search works fine, and the foundcount and groupsize show up. On Chris's advice to Kevin Futter, I added this code: if (isset($_GET['skip']) && $_GET['skip'] > 0) { $search_result->FMSkipRecords($_GET['skip']); } And the linkNext code looks like: Next"; ?> And the link I get echoes the search terms accurately ie: http://hostaddress/etredesign/pages/search_results.php?skip=30&Searchable=show&tourregion=&tourseason=Fall2004&tourkind=&tourcost=&touractivitylevel=& (Searching for tours in Fall 2004 that our content manager has marked searchable) But a) I get this stuff at the end of the link: Submit_x=98&Submit_y=17& What is that? b) More importantly, I get a Displaying trips 1 through 0 of 0 found (the found count in FMPro remains unchanged). Does anyone have any ideas what I'm doing wrong? Thanks in advance! Ben Rollins IT Manager ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From milos at mcservices.com Mon Oct 4 11:33:05 2004 From: milos at mcservices.com (Milos Vukotic) Date: Mon Oct 4 11:33:12 2004 Subject: [FX.php List] FileMaker's Return Character In-Reply-To: References: <004b01c4a56a$04674650$7bea0b45@mickeysq271eqy> Message-ID: <41618951.3090209@mcservices.com> I think you'll be ok with: $values = preg_split('/([\r\n]+)/',$fieldContent,-1,PREG_SPLIT_NO_EMPTY); If the order is not important. Cheers, -- Milos Vukotic Software Engineer MC Services http://www.mcservices.com Jason H.Awbrey wrote: > Hello All, > > I am currently trying to parse out a field that holds return-delimited > values into an array. I was trying to use explode() but I can't figure > out what the character is that FileMaker outputs as the return to use > as the string separator. Does anyone on the list know what character I > can FM is using as the return? I tried copying the output and pasting > it into BBEdit and it looks like ASCII code 13 (\r) but that doesn't > seem to be working. Any help would be appreciated. > > Cheers, > Jason H. Awbrey > >------------------------------------------------------------------------ > >_______________________________________________ >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list > > From jason at stravinsoft.com Mon Oct 4 16:17:05 2004 From: jason at stravinsoft.com (Jason H.Awbrey) Date: Mon Oct 4 16:17:10 2004 Subject: [FX.php List] FileMaker's Return Character In-Reply-To: <41618951.3090209@mcservices.com> References: <004b01c4a56a$04674650$7bea0b45@mickeysq271eqy> <41618951.3090209@mcservices.com> Message-ID: <1FBF82EA-1653-11D9-B880-000A9592DE20@stravinsoft.com> Hi Milos, That was exactly what I needed. Thanks! Best regards, Jason H. Awbrey StravinSOFT, Incorporated http://www.stravinsoft.com On Oct 4, 2004, at 12:33 PM, Milos Vukotic wrote: > I think you'll be ok with: > > $values = > preg_split('/([\r\n]+)/',$fieldContent,-1,PREG_SPLIT_NO_EMPTY); > > If the order is not important. > > Cheers, > -- > Milos Vukotic > Software Engineer > MC Services > http://www.mcservices.com > > > Jason H.Awbrey wrote: > >> Hello All, >> >> I am currently trying to parse out a field that holds >> return-delimited values into an array. I was trying to use explode() >> but I can't figure out what the character is that FileMaker outputs >> as the return to use as the string separator. Does anyone on the list >> know what character I can FM is using as the return? I tried copying >> the output and pasting it into BBEdit and it looks like ASCII code 13 >> (\r) but that doesn't seem to be working. Any help would be >> appreciated. >> >> Cheers, >> Jason H. Awbrey >> >> ---------------------------------------------------------------------- >> -- >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From kfutter at sbc.melb.catholic.edu.au Mon Oct 4 16:55:25 2004 From: kfutter at sbc.melb.catholic.edu.au (Kevin Futter) Date: Mon Oct 4 16:56:27 2004 Subject: [FX.php List] LinkNext issue In-Reply-To: Message-ID: Hi Ben, Those numbers (Submit_x=98&Submit_y=17&) are mouse coordinates for a button click, and indicate that you're using a graphic image for your submit button. They're normal. I'm still not confident enough with FX and PHP to answer your second question though. Cheers, Kevin Futter On 5/10/04 3:09 AM, "Ben Rollins" wrote: > Hi, > > I'm working on moving a travel site from CDML to FX.php, and I'm running > into an issue with LinkNext. > > The search works fine, and the foundcount and groupsize show up. > > On Chris's advice to Kevin Futter, I added this code: > > if (isset($_GET['skip']) && $_GET['skip'] > 0) { > $search_result->FMSkipRecords($_GET['skip']); > } > > And the linkNext code looks like: > > echo "Next"; > > ?> > > And the link I get echoes the search terms accurately ie: > > http://hostaddress/etredesign/pages/search_results.php?skip=30&Searchable=show > &tourregion=&tourseason=Fall2004&tourkind=&tourcost=&touractivitylevel=& > > (Searching for tours in Fall 2004 that our content manager has marked > searchable) > > But > > a) I get this stuff at the end of the link: Submit_x=98&Submit_y=17& > > What is that? > > b) More importantly, I get a Displaying trips 1 through 0 of 0 found (the > found count in FMPro remains unchanged). > > Does anyone have any ideas what I'm doing wrong? > > Thanks in advance! > > Ben Rollins > IT Manager > ElderTreks - Exotic Adventures for travelers 50 and over > Toronto, Canada > Tel: 416 588 5000 > 1 800 741 7956 > Fax: 416 588 9839 > ben@eldertreks.com > http://www.eldertreks.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From kfutter at sbc.melb.catholic.edu.au Mon Oct 4 16:57:19 2004 From: kfutter at sbc.melb.catholic.edu.au (Kevin Futter) Date: Mon Oct 4 16:58:27 2004 Subject: [FX.php List] FileMaker's Return Character In-Reply-To: <2764EB79-13E4-11D9-AA26-000A9592DE20@stravinsoft.com> Message-ID: I know this question has already been answered using regular expressions, but for the record FM appears to be using ASCII character 10 for returns (line feed), at least on Mac OS X. Cheers, Kevin Futter On 2/10/04 5:57 AM, "Jason H.Awbrey" wrote: > Hello All, > > I am currently trying to parse out a field that holds return-delimited > values into an array. I was trying to use explode() but I can't figure > out what the character is that FileMaker outputs as the return to use > as the string separator. Does anyone on the list know what character FM > is using for the return character? I tried copying the output and > pasting it into BBEdit and it looks like ASCII code 13 (\r) but that > doesn't seem to be working. Any help would be appreciated. > > Cheers, > Jason H. Awbrey > StravinSOFT, Incorporated > http://www.stravinsoft.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ben at eldertreks.com Tue Oct 5 13:05:21 2004 From: ben at eldertreks.com (Ben Rollins) Date: Tue Oct 5 13:11:17 2004 Subject: [FX.php List] LinkNext issue In-Reply-To: References: Message-ID: "FX.php Discussion List" writes: >Hi Ben, > >Those numbers (Submit_x=98&Submit_y=17&) are mouse coordinates for a >button >click, and indicate that you're using a graphic image for your submit >button. They're normal. Hmmm...I thought something like that. Well, they would be normal, except I'm using text (the word "Next") to submit the link. Odder and odder. >I'm still not confident enough with FX and PHP to >answer your second question though. And neither am I ;-) > Nice to see another Aussie on the list, though.... Ben Ben Rollins IT Manager ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From ggt667 at gmail.com Wed Oct 6 02:36:10 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 6 02:36:23 2004 Subject: [FX.php List] Problems with new version. In-Reply-To: <60A7C627-11BA-11D9-A635-000393D8E25C@knowink.net> References: <20040928023231.61A15123D36@www.iviking.org> <60A7C627-11BA-11D9-A635-000393D8E25C@knowink.net> Message-ID: Are you aware that FMP7 does not work with FX.php? FM7SA is required as the functionality formerly known as unlimited now is moved to the FM7SA. ggt On Tue, 28 Sep 2004 21:53:36 -0400, Steve Suranie wrote: > > I downloaded the newest version the other day and for some reason it > doesn't seem to be talking with FMP. I have FMP 7.0 and FMP 6.0, Mac OS > X 10.3.4. Not sure of the version of Apache, if that matters or PHP > -PHP is 4. x. Anyway, if I use an older version of FX it works fine, > when I use the newer version I get no response, doing a ['foundCount'] > check doesn't even give me a 0, just a blank page. Is there something > different I should be doing with the new version? > > Any help would be appreciated. > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ggt667 at gmail.com Wed Oct 6 02:40:31 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 6 02:40:40 2004 Subject: [FX.php List] problem: FMP appended in "search" mode after fx search In-Reply-To: References: Message-ID: As far as I know FX.php newer made FMU change mode, however if you refer to making and keeping a selection that is related to the last websearch that is righ, and probably the reason for queries in FX.php queries in former versions to be somewhat slow. If you belive that someone should be able to work on a FMU machine that is webenabled, I believe you are better off buying a new license and machine, than trying to coexist with the webenabled FMU. ggt On Wed, 29 Sep 2004 13:08:51 +0200, Softime90 Snc wrote: > Hi to all. > I am just starting to use FX, and have a problem after a FX search. > Everything is done well,(I get the correct data) but at the end of a > search, my fmpro file (version 6.04) > remains appended in search mode. > Can somebody point me where the mistake is ? > thanks in advance > Andrea > > $query1=new FX($ip_server_filemaker); > $query1->SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); > $query1->SetDBPassword($filemaker_pwd); > > // search on codProv > > $query1->AddDBParam('codProv','RA','eq'); > > $query1->AddSortParam('field1'); > $query1->AddSortParam('field2','descend'); > $query1->FMSkipRecords($select_offset); > $ReturnedData=$query1->FMFind(); > > $ReturnedData has the correct data > > fmpro is still in "search" mode (not in "use" mode) > > -- > _______________________________________________ > Softime 90 S.n.c > Via Buon Pastore 5 > 40141 Bologna (BO), Italy > tel: ++ 39.051.471057 > fax: ++ 39.051.4839735 > E-mail info@softime90.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ggt667 at gmail.com Wed Oct 6 02:41:54 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 6 02:42:06 2004 Subject: [FX.php List] FileMaker's Return Character In-Reply-To: References: <004b01c4a56a$04674650$7bea0b45@mickeysq271eqy> Message-ID: $array = explode( "\n", $string ); ggt On Wed, 29 Sep 2004 19:07:55 -0500, Jason H. Awbrey wrote: > Hello All, > > I am currently trying to parse out a field that holds return-delimited > values into an array. I was trying to use explode() but I can't figure > out what the character is that FileMaker outputs as the return to use > as the string separator. Does anyone on the list know what character I > can FM is using as the return? I tried copying the output and pasting > it into BBEdit and it looks like ASCII code 13 (\r) but that doesn't > seem to be working. Any help would be appreciated. > > Cheers, > Jason H. Awbrey > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > From ggt667 at gmail.com Wed Oct 6 02:45:05 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 6 02:45:13 2004 Subject: [FX.php List] LinkNext issue In-Reply-To: References: Message-ID: I believe I still have a sample on http://ext.comitas.no/index.phps that calculates next page. ggt On Mon, 04 Oct 2004 13:09:05 -0400, Ben Rollins wrote: > Hi, > > I'm working on moving a travel site from CDML to FX.php, and I'm running > into an issue with LinkNext. > > The search works fine, and the foundcount and groupsize show up. > > On Chris's advice to Kevin Futter, I added this code: > > if (isset($_GET['skip']) && $_GET['skip'] > 0) { > $search_result->FMSkipRecords($_GET['skip']); > } > > And the linkNext code looks like: > > echo "Next"; > > ?> > > And the link I get echoes the search terms accurately ie: > > http://hostaddress/etredesign/pages/search_results.php?skip=30&Searchable=show&tourregion=&tourseason=Fall2004&tourkind=&tourcost=&touractivitylevel=& > > (Searching for tours in Fall 2004 that our content manager has marked > searchable) > > But > > a) I get this stuff at the end of the link: Submit_x=98&Submit_y=17& > > What is that? > > b) More importantly, I get a Displaying trips 1 through 0 of 0 found (the > found count in FMPro remains unchanged). > > Does anyone have any ideas what I'm doing wrong? > > Thanks in advance! > > Ben Rollins > IT Manager > ElderTreks - Exotic Adventures for travelers 50 and over > Toronto, Canada > Tel: 416 588 5000 > 1 800 741 7956 > Fax: 416 588 9839 > ben@eldertreks.com > http://www.eldertreks.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From Fran.Armendariz at colorado.edu Thu Oct 7 09:55:31 2004 From: Fran.Armendariz at colorado.edu (Fran Armendariz) Date: Thu Oct 7 09:55:31 2004 Subject: [FX.php List] Problems with new version. Message-ID: <001001c4ac86$14c88fe0$f8738a80@armendar> Hello! I am trying to get FX/PHP working with FileMaker 7 server advanced. But I continue to get the message no record found, I think I am not making the connection to my DB. But I read this today, ?Are you aware that FMP7 does not work with FX.php?? But Steve added, ?Anyway, if I use an older version of FX it works fine, ? when I use the newer version I get no response,? Is it possible to get an older version of FX to see if that will help my problem? On the web site http://www.iviking.org/ I don?t have an option to download an older version. Thank you! Fran Armendariz Fran Armendariz IT Professional Environmental Health & Safety University of Colorado 303 735-4138 ?When in despair I remember that all through history the way of truth and love has always won; there have been tyrants and murderers, and for a time they can seem invincible, but in the end they always fall. Think of it. Always.? M. Gandhi From log-out at yacobi.com Thu Oct 7 10:03:12 2004 From: log-out at yacobi.com (Log-Out) Date: Thu Oct 7 10:03:46 2004 Subject: [FX.php List] Problems with new version. In-Reply-To: <001001c4ac86$14c88fe0$f8738a80@armendar> References: <001001c4ac86$14c88fe0$f8738a80@armendar> Message-ID: <63B17FDF-187A-11D9-BA03-000A959E46DE@yacobi.com> El 07/10/2004, a las 17:55, Fran Armendariz escribi?: > Is it possible to get an older version of FX to see if that will > help my problem? > On the web site http://www.iviking.org/ I don?t have an option to > download an older version. I have the "pre-FM7" version of FX. I can send you if you want... Log-Out Spain From milos at mcservices.com Thu Oct 7 10:28:56 2004 From: milos at mcservices.com (Milos Vukotic) Date: Thu Oct 7 10:29:14 2004 Subject: [FX.php List] Problems with new version. In-Reply-To: <001001c4ac86$14c88fe0$f8738a80@armendar> References: <001001c4ac86$14c88fe0$f8738a80@armendar> Message-ID: <41656EC8.5000700@mcservices.com> 1) Check first is your DB on the web. If not get it done first. 2) put as the first line in your php script, before including FX.php: Then when you try to do something with FX.php you'll see the actual URL which is used to access FMP7 database. Cut & Paste it in the browser's "Address bar" (or what ever is called), and see what you are getting. Cheers, -- Milos Vukotic Software Engineer MC Services http://www.mcservices.com Fran Armendariz wrote: >Hello! > > I am trying to get FX/PHP working with FileMaker 7 server advanced. > But I continue to get the message no record found, I think I am not making the connection to my DB. > But I read this today, ?Are you aware that FMP7 does not work with FX.php?? > But Steve added, ?Anyway, if I use an older version of FX it works fine, >? when I use the newer version I get no response,? > > Is it possible to get an older version of FX to see if that will help my problem? > On the web site http://www.iviking.org/ I don?t have an option to download an older version. > >Thank you! >Fran Armendariz > > > >Fran Armendariz >IT Professional >Environmental Health & Safety >University of Colorado >303 735-4138 > > ?When in despair I remember that all through history the way of truth and love has always won; there have been tyrants and murderers, and for a time they can seem invincible, but in the end they always fall. >Think of it. Always.? >M. Gandhi > > >_______________________________________________ >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list > > > From ben at eldertreks.com Thu Oct 7 20:52:29 2004 From: ben at eldertreks.com (Ben Rollins) Date: Thu Oct 7 20:58:23 2004 Subject: [FX.php List] Passing a direct link Message-ID: Me again... Is there any way to hard code a search URL using fx.php in the way you could with CDML? (ie: http://serverip/FMPro?db=-db.fp5&-lay=layout&-format=results.html&-field=searchterm&-find) Is there any way to do the same thing in fx.php? I have a map of the world where I'd like to have each area return a search on the selected region via the link embedded in the image (or in the flash movie, depending which way we go...) Thanks in advance! Ben. From lmiranda at gmail.com Thu Oct 7 23:39:06 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 7 23:39:22 2004 Subject: [FX.php List] errorCode 511 ? Message-ID: <5016fc504100722396b70b885@mail.gmail.com> What is this error code? [errorCode] => 511 On the manual i got from the "Excerpt from FileMaker Developer's Guide" it does not have a 511 error. The only one thats closest to 511 is 510 (related value is empty or unavailable). My fx.php is.. $insertFM = new FX("192.168.0.45", "8080"); $insertFM -> SetDBData("Agencies.fp5", "List"); $insertFM -> AddDBParam("Agency","$office_catch"); // username $insertFM -> AddDBParam("Password","$random_password"); // password $insertFM -> AddDBParam("Filename","$upload_fname"); // filename $insertFM -> AddDBParam("DateUpdated","$ritcheDATE"); // dateposted $insertFM -> AddDBParam("WebFtp","$email_catch"); // web or ftp //$insertFM -> AddDBParam("Field","none"); // email field //$insertFM -> AddDBParam("F","$upload_fname"); // filename //$insertFM -> AddDBParam("ExpireDate","$add7days"); // expiry date of file*/ $result = $insertFM->FMNew(); Can i pass a (@) sign on the agency field? it does not pass the data. -- Louie Miranda http://www.axishift.com From steve at bluecrocodile.co.nz Thu Oct 7 23:46:57 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Thu Oct 7 23:47:59 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: Message-ID: Ben, Sure there is :-) Here's a quick pseudo version of it, I'm writing this off the top of my head so don't promise it'll work exactly as I write here...On your map you'd create a link http://server/results.php?region=thisRegion then on results.php you'd out something like; $thisSearch = new FX($serverIP, $portNumber); $thisSearch -> SetDBData('yourDatabase', 'layout'); $thisSearch -> AddDBParam('region', $_REQUEST['region']); $returnedData = $thisSearch -> FMFind(); now the array $returnedData will contain all of the records from your search... Hope this makes sense, let me know if you need more help... Cheers Steve -----Original Message----- From: "Ben Rollins" To: "FX.php Discussion List" Date: Thu, 07 Oct 2004 22:52:29 -0400 Subject: [FX.php List] Passing a direct link > Me again... > > Is there any way to hard code a search URL using fx.php in the way you > could with CDML? (ie: > http://serverip/FMPro?db=-db.fp5&-lay=layout&-format=results.html&-fiel > d=searchterm&-find) > > Is there any way to do the same thing in fx.php? I have a map of the > world > where I'd like to have each area return a search on the selected region > via the link embedded in the image (or in the flash movie, depending > which > way we go...) > > Thanks in advance! > > Ben. > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From lmiranda at gmail.com Thu Oct 7 23:55:09 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 7 23:55:22 2004 Subject: [FX.php List] Re: errorCode 511 ? In-Reply-To: <5016fc504100722396b70b885@mail.gmail.com> References: <5016fc504100722396b70b885@mail.gmail.com> Message-ID: <5016fc504100722552f769e58@mail.gmail.com> i found the problem. the field needs to be adjusted, because it limits me to 20chars only. On Fri, 8 Oct 2004 13:39:06 +0800, Louie Miranda wrote: > What is this error code? > > [errorCode] => 511 > > On the manual i got from the "Excerpt from FileMaker Developer's > Guide" it does not have a 511 error. The only one thats closest to 511 > is 510 (related value is empty or unavailable). > > My fx.php is.. > > $insertFM = new FX("192.168.0.45", "8080"); > $insertFM -> SetDBData("Agencies.fp5", "List"); > $insertFM -> AddDBParam("Agency","$office_catch"); // username > $insertFM -> AddDBParam("Password","$random_password"); // password > $insertFM -> AddDBParam("Filename","$upload_fname"); // filename > $insertFM -> AddDBParam("DateUpdated","$ritcheDATE"); // dateposted > $insertFM -> AddDBParam("WebFtp","$email_catch"); // web or ftp > //$insertFM -> AddDBParam("Field","none"); // email field > //$insertFM -> AddDBParam("F","$upload_fname"); // filename > //$insertFM -> AddDBParam("ExpireDate","$add7days"); // expiry date of file*/ > $result = $insertFM->FMNew(); > > Can i pass a (@) sign on the agency field? it does not pass the data. > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com From lmiranda at gmail.com Thu Oct 7 23:55:37 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 7 23:55:49 2004 Subject: [FX.php List] Re: errorCode 511 ? In-Reply-To: <5016fc504100722552f769e58@mail.gmail.com> References: <5016fc504100722396b70b885@mail.gmail.com> <5016fc504100722552f769e58@mail.gmail.com> Message-ID: <5016fc504100722553776c927@mail.gmail.com> ah, thats an updated error codes. thanks steve! On Fri, 8 Oct 2004 13:55:09 +0800, Louie Miranda wrote: > i found the problem. the field needs to be adjusted, because it limits > me to 20chars only. > > > > > On Fri, 8 Oct 2004 13:39:06 +0800, Louie Miranda wrote: > > What is this error code? > > > > [errorCode] => 511 > > > > On the manual i got from the "Excerpt from FileMaker Developer's > > Guide" it does not have a 511 error. The only one thats closest to 511 > > is 510 (related value is empty or unavailable). > > > > My fx.php is.. > > > > $insertFM = new FX("192.168.0.45", "8080"); > > $insertFM -> SetDBData("Agencies.fp5", "List"); > > $insertFM -> AddDBParam("Agency","$office_catch"); // username > > $insertFM -> AddDBParam("Password","$random_password"); // password > > $insertFM -> AddDBParam("Filename","$upload_fname"); // filename > > $insertFM -> AddDBParam("DateUpdated","$ritcheDATE"); // dateposted > > $insertFM -> AddDBParam("WebFtp","$email_catch"); // web or ftp > > //$insertFM -> AddDBParam("Field","none"); // email field > > //$insertFM -> AddDBParam("F","$upload_fname"); // filename > > //$insertFM -> AddDBParam("ExpireDate","$add7days"); // expiry date of file*/ > > $result = $insertFM->FMNew(); > > > > Can i pass a (@) sign on the agency field? it does not pass the data. > > > > -- > > Louie Miranda > > http://www.axishift.com > > > > > > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com From info at softime90.com Fri Oct 8 02:12:56 2004 From: info at softime90.com (Softime90 Snc) Date: Fri Oct 8 02:13:16 2004 Subject: [FX.php List] problem: FMP appended in "search" mode after fx search Message-ID: Hi to all. I am just starting to use FX, and have a problem after a FX search. Everything is done well,(I get the correct data) but at the end of a search, my fmpro file (version 6.04) remains appended in search mode. Can somebody point me where the mistake is ? thanks in advance Andrea $query1=new FX($ip_server_filemaker); $query1->SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); $query1->SetDBPassword($filemaker_pwd); // search on codProv $query1->AddDBParam('codProv','RA','eq'); $query1->AddSortParam('field1'); $query1->AddSortParam('field2','descend'); $query1->FMSkipRecords($select_offset); $ReturnedData=$query1->FMFind(); $ReturnedData has the correct data fmpro is still in "search" mode (not in "use" mode) -- _______________________________________________ Softime 90 S.n.c Via Buon Pastore 5 40141 Bologna (BO), Italy tel: ++ 39.051.471057 fax: ++ 39.051.4839735 E-mail info@softime90.com From ben at eldertreks.com Fri Oct 8 08:42:01 2004 From: ben at eldertreks.com (Ben Rollins) Date: Fri Oct 8 08:47:54 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: Message-ID: Hey Steve, Thanks, that works well _except_ - there's already a $_post data for that field on that page because it is the general search results page, has a form on it that returns to itself - uses $_POST data to refer to existing queries, set up form elements etc etc. I feel like some of the stuff I'm doing is reasonably OK, and the rest is utterly clueless! ;-) I will have to set up two searches, I guess, and test for isset ($_POST) or isset ($_REQUEST) to display different result sets? Is that how you'd go about it? Maybe I'll just set up a second results page from the map using a different search for the time being - inefficient, but I'm under the hammer to get a project done - I'll clean it up later on... Thanks! > >Ben, > >Sure there is :-) > >Here's a quick pseudo version of it, I'm writing this off the top of my >head so don't promise it'll work exactly as I write here...On your map >you'd create a link > >http://server/results.php?region=thisRegion > >then on results.php you'd out something like; > > > $thisSearch = new FX($serverIP, $portNumber); > $thisSearch -> SetDBData('yourDatabase', 'layout'); > $thisSearch -> AddDBParam('region', $_REQUEST['region']); > $returnedData = $thisSearch -> FMFind(); > >now the array $returnedData will contain all of the records from your >search... > >Hope this makes sense, let me know if you need more help... > >Cheers >Steve Ben Rollins IT Manager ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From ggt667 at gmail.com Fri Oct 8 10:10:50 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Fri Oct 8 10:11:07 2004 Subject: [FX.php List] problem: FMP appended in "search" mode after fx search In-Reply-To: References: Message-ID: I find this to be very impressive, I have never been able to run FX.php when it's not in Browse mode, and I have never seen it leave browse mode. ggt On Fri, 8 Oct 2004 10:12:56 +0200, Softime90 Snc wrote: > Hi to all. > I am just starting to use FX, and have a problem after a FX search. > Everything is done well,(I get the correct data) but at the end of a > search, my fmpro file (version 6.04) > remains appended in search mode. > Can somebody point me where the mistake is ? > thanks in advance > Andrea > > $query1=new FX($ip_server_filemaker); > $query1->SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); > $query1->SetDBPassword($filemaker_pwd); > > // search on codProv > > $query1->AddDBParam('codProv','RA','eq'); > > $query1->AddSortParam('field1'); > $query1->AddSortParam('field2','descend'); > $query1->FMSkipRecords($select_offset); > $ReturnedData=$query1->FMFind(); > > $ReturnedData has the correct data > > fmpro is still in "search" mode (not in "use" mode) > > -- > _______________________________________________ > Softime 90 S.n.c > Via Buon Pastore 5 > 40141 Bologna (BO), Italy > tel: ++ 39.051.471057 > fax: ++ 39.051.4839735 > E-mail info@softime90.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From milos at mcservices.com Fri Oct 8 13:51:55 2004 From: milos at mcservices.com (Milos Vukotic) Date: Fri Oct 8 13:52:23 2004 Subject: [FX.php List] FMSA7 & @ character References: Message-ID: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Does any one know how to search for record that contains "@" in field content? In example: $db->AddDBParam("SomeEmail","some@some.com"); or $db->AddDBParam("SomeEmail","some@some.com","eq"); or $db->AddDBParam("SomeEmail","some@some.com","cn"); does not work, even if you try search from FMD7 for "=some@some.com". What works from FMD7 is "==some@some.com", but I don't see equivalent for CWP :(. Thanks, -- Milos Vukotic Software Engineer MC Services From jim at grouptour.com Fri Oct 8 14:04:05 2004 From: jim at grouptour.com (Jim Bowser) Date: Fri Oct 8 14:04:20 2004 Subject: [FX.php List] FMSA7 & @ character In-Reply-To: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Message-ID: I have had the same problem. I worked around it by creating a calculation field that replaced or omitted every "@", ".", "-" and "_" symbol from my email field in Filemaker and then used my fx.php code to search against that new calculation field instead. It works great now. On 10/8/04 3:51 PM, "Milos Vukotic" wrote: > Does any one know how to search for record that contains "@" in field > content? > > In example: > > $db->AddDBParam("SomeEmail","some@some.com"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > does not work, even if you try search from FMD7 for "=some@some.com". What > works from FMD7 is "==some@some.com", but I don't see equivalent for CWP :(. > > > Thanks, > -- > Milos Vukotic > Software Engineer > MC Services > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list Jim Bowser Network Manager Shoreline Creations Ltd. Publisher of: GROUP TOUR MAGAZINE STUDENT GROUP TOUR MAGAZINE 616-393-2077 x120 800-767-3489 x120 jim@grouptour.com www.grouptour.com From jim at grouptour.com Fri Oct 8 14:06:37 2004 From: jim at grouptour.com (Jim Bowser) Date: Fri Oct 8 14:06:51 2004 Subject: [FX.php List] FMSA7 & @ character In-Reply-To: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Message-ID: Oh, yeah. I also used a str_replace() to remove or replace those same symbols from the strings in my code. Sorry I forgot to mention this earlier... On 10/8/04 3:51 PM, "Milos Vukotic" wrote: > Does any one know how to search for record that contains "@" in field > content? > > In example: > > $db->AddDBParam("SomeEmail","some@some.com"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > does not work, even if you try search from FMD7 for "=some@some.com". What > works from FMD7 is "==some@some.com", but I don't see equivalent for CWP :(. > > > Thanks, > -- > Milos Vukotic > Software Engineer > MC Services > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list Jim Bowser Network Manager Shoreline Creations Ltd. Publisher of: GROUP TOUR MAGAZINE STUDENT GROUP TOUR MAGAZINE 616-393-2077 x120 800-767-3489 x120 jim@grouptour.com www.grouptour.com From milos at mcservices.com Fri Oct 8 14:14:50 2004 From: milos at mcservices.com (Milos Vukotic) Date: Fri Oct 8 14:16:08 2004 Subject: [FX.php List] FMSA7 & @ character References: Message-ID: <004901c4ad73$7df46730$7bea0b45@mickeysq271eqy> I hoped that there is some nicer work around, but if that is only solution, I'll try to live with it :). Thanks, Milos ----- Original Message ----- From: "Jim Bowser" To: "FX.php Discussion List" Sent: Friday, October 08, 2004 3:06 PM Subject: Re: [FX.php List] FMSA7 & @ character > Oh, yeah. I also used a str_replace() to remove or replace those same > symbols from the strings in my code. > > Sorry I forgot to mention this earlier... > > > > On 10/8/04 3:51 PM, "Milos Vukotic" wrote: > > > Does any one know how to search for record that contains "@" in field > > content? > > > > In example: > > > > $db->AddDBParam("SomeEmail","some@some.com"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > > > > does not work, even if you try search from FMD7 for "=some@some.com". What > > works from FMD7 is "==some@some.com", but I don't see equivalent for CWP :(. > > > > > > Thanks, > > -- > > Milos Vukotic > > Software Engineer > > MC Services > > > > > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > Jim Bowser > Network Manager > Shoreline Creations Ltd. > Publisher of: > GROUP TOUR MAGAZINE > STUDENT GROUP TOUR MAGAZINE > > 616-393-2077 x120 > 800-767-3489 x120 > jim@grouptour.com > www.grouptour.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From milos at mcservices.com Fri Oct 8 14:26:40 2004 From: milos at mcservices.com (Milos Vukotic) Date: Fri Oct 8 14:27:01 2004 Subject: [FX.php List] FMSA7 & @ character References: Message-ID: <005f01c4ad75$1fb45f70$7bea0b45@mickeysq271eqy> For e-mail field replacing just "@" with " " works fine. Thanks, Milos ----- Original Message ----- From: "Jim Bowser" To: "FX.php Discussion List" Sent: Friday, October 08, 2004 3:06 PM Subject: Re: [FX.php List] FMSA7 & @ character > Oh, yeah. I also used a str_replace() to remove or replace those same > symbols from the strings in my code. > > Sorry I forgot to mention this earlier... > > > > On 10/8/04 3:51 PM, "Milos Vukotic" wrote: > > > Does any one know how to search for record that contains "@" in field > > content? > > > > In example: > > > > $db->AddDBParam("SomeEmail","some@some.com"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > > > > does not work, even if you try search from FMD7 for "=some@some.com". What > > works from FMD7 is "==some@some.com", but I don't see equivalent for CWP :(. > > > > > > Thanks, > > -- > > Milos Vukotic > > Software Engineer > > MC Services > > > > > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > Jim Bowser > Network Manager > Shoreline Creations Ltd. > Publisher of: > GROUP TOUR MAGAZINE > STUDENT GROUP TOUR MAGAZINE > > 616-393-2077 x120 > 800-767-3489 x120 > jim@grouptour.com > www.grouptour.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From steve at bluecrocodile.co.nz Fri Oct 8 14:52:04 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 8 14:52:42 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: Message-ID: Hey Ben, > Thanks, that works well _except_ - there's already a $_post data for > that field on that page because it is the general search results page, > has a form on it that returns to itself - uses $_POST data to refer to > existing queries, set up form elements etc etc. Okay there are a couple of ways to get around this... > I feel like some of the stuff I'm doing is reasonably OK, and the rest > is utterly clueless! ;-) You'll be amazed at how quickly the shift moves towards the 'reasonably OK' and away from the 'utterly clueless'...fear not and carry on, I'm in the process of moving an FM web based system I developed in 2000 from CDML to using FX.php and when I look at the stuff I wrote 4 years ago I'm amazed at how much I've learnt... ;-) > I will have to set up two searches, I guess, and test for isset > ($_POST) or isset ($_REQUEST) to display different result sets? Is > that how you'd go about it? That would be option one, only you'd need to use $_POST and $_GET. The other option would be to include an additional variable in post or your get and then branch on your results page. Particularly when I'm dealing with bookings on one website I work on, I have the one page that things are posted to, then pass a variable I call 'action' along with all the other data, that way I can get the one page to handle new bookings, edits, cancelations, reprints of the confirmation letter (and because I never delete anything it's even possible to 'un-cancel' a booking)... So sometimes you get to the page via a get eg; http://server/booking/bookingDetails.php?record=3333&action=reprint So that way the bookingDetails.php page kow that all it has to do is search the correct db, and display the confirmation letter... On one form I have all the details, then a collection of buttons at the bottom, each of which defines the value of 'action' as the form is submitted etc... Following this method on bookingsDetails.php I then have; if($_REQUEST['action'] == 'reprint') { do this stuff } if($_REQUEST['action'] == 'edit') { do this stuff } if($_REQUEST['action'] == 'cancel') { do this stuff } (note I'd suggest you start by checking isset($_REQUEST['action']) and if not then display some error message, or the default search page or whatever you want... etc etc...note that $_REQUEST is used if your page should be accepting either a get or a post, and in fact you can always determine which it was (get or post) and use that info to decide what to do... > Maybe I'll just set up a second results page from the map using a > different search for the time being - inefficient, but I'm under the > hammer to get a project done - I'll clean it up later on... Your $_GET/$_POST suggestion above will be just as effective, and 'cleaner' if time's of concern... Best of luck Steve > Thanks! > > > > > >Ben, > > > >Sure there is :-) > > > >Here's a quick pseudo version of it, I'm writing this off the top of > my > >head so don't promise it'll work exactly as I write here...On your map > >you'd create a link > > > >http://server/results.php?region=thisRegion > > > >then on results.php you'd out something like; > > > > > > $thisSearch = new FX($serverIP, $portNumber); > > $thisSearch -> SetDBData('yourDatabase', 'layout'); > > $thisSearch -> AddDBParam('region', $_REQUEST['region']); > > $returnedData = $thisSearch -> FMFind(); > > > >now the array $returnedData will contain all of the records from your > >search... > > > >Hope this makes sense, let me know if you need more help... > > > >Cheers > >Steve > > > Ben Rollins > IT Manager > ElderTreks - Exotic Adventures for travelers 50 and over > Toronto, Canada > Tel: 416 588 5000 > 1 800 741 7956 > Fax: 416 588 9839 > ben@eldertreks.com > http://www.eldertreks.com > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From ggt667 at gmail.com Fri Oct 8 15:06:52 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Fri Oct 8 15:08:40 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: Message-ID: switch( $_REQUEST['action'] ) { case 'reprint': ?//do this stuff break; case 'edit': ?//do this stuff break; case 'cancel': ?//do this stuff break; } On Sat, 09 Oct 2004 09:52:04 +1300, Steve Winter wrote: > Hey Ben, > > > Thanks, that works well _except_ - there's already a $_post data for > > that field on that page because it is the general search results page, > > has a form on it that returns to itself - uses $_POST data to refer to > > existing queries, set up form elements etc etc. > > Okay there are a couple of ways to get around this... > > > I feel like some of the stuff I'm doing is reasonably OK, and the rest > > is utterly clueless! ;-) > > You'll be amazed at how quickly the shift moves towards the 'reasonably > OK' and away from the 'utterly clueless'...fear not and carry on, I'm in > the process of moving an FM web based system I developed in 2000 from > CDML to using FX.php and when I look at the stuff I wrote 4 years ago > I'm amazed at how much I've learnt... ;-) > > > I will have to set up two searches, I guess, and test for isset > > ($_POST) or isset ($_REQUEST) to display different result sets? Is > > that how you'd go about it? > > That would be option one, only you'd need to use $_POST and $_GET. > > The other option would be to include an additional variable in post or > your get and then branch on your results page. > > Particularly when I'm dealing with bookings on one website I work on, I > have the one page that things are posted to, then pass a variable I > call 'action' along with all the other data, that way I can get the one > page to handle new bookings, edits, cancelations, reprints of the > confirmation letter (and because I never delete anything it's even > possible to 'un-cancel' a booking)... > > So sometimes you get to the page via a get eg; > http://server/booking/bookingDetails.php?record=3333&action=reprint > So that way the bookingDetails.php page kow that all it has to do is > search the correct db, and display the confirmation letter... > > On one form I have all the details, then a collection of buttons at the > bottom, each of which defines the value of 'action' as the form is > submitted etc... > > Following this method on bookingsDetails.php I then have; > > if($_REQUEST['action'] == 'reprint') { > do this stuff } > > if($_REQUEST['action'] == 'edit') { > do this stuff } > > if($_REQUEST['action'] == 'cancel') { > do this stuff } > > (note I'd suggest you start by checking isset($_REQUEST['action']) and > if not then display some error message, or the default search page or > whatever you want... > > etc etc...note that $_REQUEST is used if your page should be accepting > either a get or a post, and in fact you can always determine which it > was (get or post) and use that info to decide what to do... > > > Maybe I'll just set up a second results page from the map using a > > different search for the time being - inefficient, but I'm under the > > hammer to get a project done - I'll clean it up later on... > > Your $_GET/$_POST suggestion above will be just as effective, > and 'cleaner' if time's of concern... > > Best of luck > Steve > > > Thanks! > > > > > > > > > >Ben, > > > > > >Sure there is :-) > > > > > >Here's a quick pseudo version of it, I'm writing this off the top of > > my > > >head so don't promise it'll work exactly as I write here...On your map > > >you'd create a link > > > > > >http://server/results.php?region=thisRegion > > > > > >then on results.php you'd out something like; > > > > > > > > > $thisSearch = new FX($serverIP, $portNumber); > > > $thisSearch -> SetDBData('yourDatabase', 'layout'); > > > $thisSearch -> AddDBParam('region', $_REQUEST['region']); > > > $returnedData = $thisSearch -> FMFind(); > > > > > >now the array $returnedData will contain all of the records from your > > >search... > > > > > >Hope this makes sense, let me know if you need more help... > > > > > >Cheers > > >Steve > > > > > > Ben Rollins > > IT Manager > > ElderTreks - Exotic Adventures for travelers 50 and over > > Toronto, Canada > > Tel: 416 588 5000 > > 1 800 741 7956 > > Fax: 416 588 9839 > > ben@eldertreks.com > > http://www.eldertreks.com > > > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From steve at bluecrocodile.co.nz Fri Oct 8 15:14:09 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 8 15:15:33 2004 Subject: [FX.php List] FMSA7 & @ character In-Reply-To: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> References: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Message-ID: Hi, If "==some@some.com" works directly in FMD7 then try; $db->AddDBParam("SomeEmail","==some@some.com"); which if the email is in a variable (or post array) becomes; $db->AddDBParam("SomeEmail","==". $someEmail); In some cases I've found that when using adding the '==' to the start of a search as above you need to add the third parameter 'bw' to give; $db->AddDBParam("SomeEmail","==". $someEmail, 'bw'); (Note I've not tested this, I'm sitting in an airport lounge waiting for a plane and writing this off the top of my head...let us know how you get on) Cheers Steve > Does any one know how to search for record that contains "@" in field > content? > > In example: > > $db->AddDBParam("SomeEmail","some@some.com"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > or > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > does not work, even if you try search from FMD7 for "=some@some.com". > What > works from FMD7 is "==some@some.com", but I don't see equivalent for > CWP :(. > > > Thanks, > -- > Milos Vukotic > Software Engineer > MC Services > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From steve at bluecrocodile.co.nz Fri Oct 8 15:18:33 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 8 15:19:47 2004 Subject: [FX.php List] Replying to the list In-Reply-To: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> References: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Message-ID: Hi, Why is it that sometimes when I reply to messages on the list the replies go to the list, and other times they go to the individual that posted them...??...and how come I never see my own posts on the list...??.. ;-) Just curious Steve From ben at eldertreks.com Fri Oct 8 15:16:57 2004 From: ben at eldertreks.com (Ben Rollins) Date: Fri Oct 8 15:22:50 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: < > < > Message-ID: Hey Steve, Thanks for that - it's really helpful, and when I get a moment, I'll fully read and digest. At the moment, I'm trying to complete a site in the next week, while preparing to pretty much move to Australia, so quick and dirty it is at the moment. I just threw a second results page in there to handle that specific case, and then the search form on that page takes them to the "real" results page in case they need to do any more detailed searching. Here's a question though, which might help me address my linkNext issue: does linkNext use a $_GET or $_POST request by default? Nothing I've tried works, and I'm at the point where I'm ready to let users get 70 or 80 results on a page so I can move on... Cheers, and thanks again... Ben Oh - on your list question: sometimes the reply-to is set as the personal address - I think it might be due to vagaries of mail clients. You can always manually address to the list address, though, and that should work. Your replies seem to show up on my edition of the archives... "FX.php Discussion List" writes: >Hey Ben, > >> Thanks, that works well _except_ - there's already a $_post data for >> that field on that page because it is the general search results page, >> has a form on it that returns to itself - uses $_POST data to refer to >> existing queries, set up form elements etc etc. > >Okay there are a couple of ways to get around this... > >> I feel like some of the stuff I'm doing is reasonably OK, and the rest >> is utterly clueless! ;-) > >You'll be amazed at how quickly the shift moves towards the 'reasonably >OK' and away from the 'utterly clueless'...fear not and carry on, I'm in >the process of moving an FM web based system I developed in 2000 from >CDML to using FX.php and when I look at the stuff I wrote 4 years ago >I'm amazed at how much I've learnt... ;-) > >> I will have to set up two searches, I guess, and test for isset >> ($_POST) or isset ($_REQUEST) to display different result sets? Is >> that how you'd go about it? > >That would be option one, only you'd need to use $_POST and $_GET. > >The other option would be to include an additional variable in post or >your get and then branch on your results page. > >Particularly when I'm dealing with bookings on one website I work on, I >have the one page that things are posted to, then pass a variable I >call 'action' along with all the other data, that way I can get the one >page to handle new bookings, edits, cancelations, reprints of the >confirmation letter (and because I never delete anything it's even >possible to 'un-cancel' a booking)... > >So sometimes you get to the page via a get eg; > http://server/booking/bookingDetails.php?record=3333&action=reprint >So that way the bookingDetails.php page kow that all it has to do is >search the correct db, and display the confirmation letter... > >On one form I have all the details, then a collection of buttons at the >bottom, each of which defines the value of 'action' as the form is >submitted etc... > >Following this method on bookingsDetails.php I then have; > >if($_REQUEST['action'] == 'reprint') { > do this stuff } > >if($_REQUEST['action'] == 'edit') { > do this stuff } > >if($_REQUEST['action'] == 'cancel') { > do this stuff } > >(note I'd suggest you start by checking isset($_REQUEST['action']) and >if not then display some error message, or the default search page or >whatever you want... > >etc etc...note that $_REQUEST is used if your page should be accepting >either a get or a post, and in fact you can always determine which it >was (get or post) and use that info to decide what to do... > >> Maybe I'll just set up a second results page from the map using a >> different search for the time being - inefficient, but I'm under the >> hammer to get a project done - I'll clean it up later on... > >Your $_GET/$_POST suggestion above will be just as effective, >and 'cleaner' if time's of concern... > >Best of luck >Steve > >> Thanks! >> >> >> > >> >Ben, >> > >> >Sure there is :-) >> > >> >Here's a quick pseudo version of it, I'm writing this off the top of >> my >> >head so don't promise it'll work exactly as I write here...On your map >> >you'd create a link >> > >> >http://server/results.php?region=thisRegion >> > >> >then on results.php you'd out something like; >> > >> > >> > $thisSearch = new FX($serverIP, $portNumber); >> > $thisSearch -> SetDBData('yourDatabase', 'layout'); >> > $thisSearch -> AddDBParam('region', $_REQUEST['region']); >> > $returnedData = $thisSearch -> FMFind(); >> > >> >now the array $returnedData will contain all of the records from your >> >search... >> > >> >Hope this makes sense, let me know if you need more help... >> > >> >Cheers >> >Steve >> >> >> Ben Rollins >> IT Manager >> ElderTreks - Exotic Adventures for travelers 50 and over >> Toronto, Canada >> Tel: 416 588 5000 >> 1 800 741 7956 >> Fax: 416 588 9839 >> ben@eldertreks.com >> http://www.eldertreks.com >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > >_______________________________________________ >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list Ben Rollins IT Manager ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From ben at eldertreks.com Fri Oct 8 15:17:48 2004 From: ben at eldertreks.com (Ben Rollins) Date: Fri Oct 8 15:23:41 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: < > < > < > Message-ID: Hi Gjermund, Do you prefer switch over if/else constructions for performance/elegance/other reasons? Is it only preferred when there's lots of options, more than two? Cheers, Ben Gjermund Gusland Thorsen writes: >switch( $_REQUEST['action'] ) { >case 'reprint': > //do this stuff >break; > >case 'edit': > //do this stuff >break; > >case 'cancel': > //do this stuff >break; >} Ben Rollins ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From ben at eldertreks.com Fri Oct 8 15:21:30 2004 From: ben at eldertreks.com (Ben Rollins) Date: Fri Oct 8 15:27:32 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: < > < > < > Message-ID: Oh, and thanks for the next page example you posted. I've saved it for detailed inspection. It's a lot more elegant than the CDMl equivalent... even though I haven't got it to work yet (you construct your searches in a very different way to me, probably because you know what you're doing). Looking and learning... Cheers, Ben Ben Rollins ElderTreks - Exotic Adventures for travelers 50 and over Toronto, Canada Tel: 416 588 5000 1 800 741 7956 Fax: 416 588 9839 ben@eldertreks.com http://www.eldertreks.com From steve at bluecrocodile.co.nz Fri Oct 8 15:31:51 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 8 15:32:48 2004 Subject: [FX.php List] problem: FMP appended in "search" mode after fx search In-Reply-To: References: Message-ID: Andrea, Some questions and thoughts...are you sure there isn't a script running anywhere that might be leaving you in find mode...??...I presume that if the db stays in find mode that the next request fails...??... Ahh, I think I spot your problem...are you using the 'correct' version of FX.php, you say you're using FM6 as your data source...??..but it looks a bit to me like you're using the latest version of FX.php (I think this because of the third parameter in SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); The third parameter here is specfic to FM7 (see the FX.php docs for an explanation) so if your data source is FM6 you need to do 2 things; 1. remove the third parameter from SetDBData 2. change you first line to tell FX.php it's talking to FM6 $query1 = new FX($ip, $port, 'FMPro5/6'); (where $ip and $port are whatever the actual variables you're storing that info in are) Just some thoughts...let us know how you get on... Steve > On Fri, 8 Oct 2004 10:12:56 +0200, Softime90 Snc > wrote: > > Hi to all. > > I am just starting to use FX, and have a problem after a FX search. > > Everything is done well,(I get the correct data) but at the end of a > > search, my fmpro file (version 6.04) > > remains appended in search mode. > > Can somebody point me where the mistake is ? > > thanks in advance > > Andrea > > > > $query1=new FX($ip_server_filemaker); > > > $query1->SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); > > $query1->SetDBPassword($filemaker_pwd); > > > > // search on codProv > > > > $query1->AddDBParam('codProv','RA','eq'); > > > > $query1->AddSortParam('field1'); > > $query1->AddSortParam('field2','descend'); > > $query1->FMSkipRecords($select_offset); > > $ReturnedData=$query1->FMFind(); > > > > $ReturnedData has the correct data > > > > fmpro is still in "search" mode (not in "use" mode) > > > > -- > > _______________________________________________ > > Softime 90 S.n.c > > Via Buon Pastore 5 > > 40141 Bologna (BO), Italy > > tel: ++ 39.051.471057 > > fax: ++ 39.051.4839735 > > E-mail info@softime90.com > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From ggt667 at gmail.com Fri Oct 8 15:39:34 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Fri Oct 8 15:39:49 2004 Subject: [FX.php List] Passing a direct link In-Reply-To: References: Message-ID: I think very often I have an oo( object oriented ) approach to developing at that helps alot in seeing the problem from the outside, not adopting the problem and having headaches thereof. Even with one option a switch could be nice to work with using default: switch( $_REQUEST['a'] ) { case 'cancel': header( "Location: /index.php" ); exit; break; default: //do this stuff break; } I think it's a matter of taste. ggt On Fri, 08 Oct 2004 17:21:30 -0400, Ben Rollins wrote: > Oh, and thanks for the next page example you posted. I've saved it for > detailed inspection. It's a lot more elegant than the CDMl equivalent... > even though I haven't got it to work yet (you construct your searches in a > very different way to me, probably because you know what you're doing). > Looking and learning... > > Cheers, > Ben > > Ben Rollins > > > ElderTreks - Exotic Adventures for travelers 50 and over > Toronto, Canada > Tel: 416 588 5000 > 1 800 741 7956 > Fax: 416 588 9839 > ben@eldertreks.com > http://www.eldertreks.com > > From milos at mcservices.com Fri Oct 8 15:50:12 2004 From: milos at mcservices.com (Milos Vukotic) Date: Fri Oct 8 15:56:04 2004 Subject: [FX.php List] FMSA7 & @ character References: <003d01c4ad70$50e00ea0$7bea0b45@mickeysq271eqy> Message-ID: <009d01c4ad80$cf57e680$7bea0b45@mickeysq271eqy> Just tested and had no luck with "eq". BUT (!!!) with "bw" it works! I still need to test it, but for now seems to work correctly. Thanks, Milos ----- Original Message ----- From: "Steve Winter" To: "FX.php Discussion List" Sent: Friday, October 08, 2004 4:14 PM Subject: Re: [FX.php List] FMSA7 & @ character > Hi, > > If "==some@some.com" works directly in FMD7 then try; > > $db->AddDBParam("SomeEmail","==some@some.com"); > > which if the email is in a variable (or post array) becomes; > > $db->AddDBParam("SomeEmail","==". $someEmail); > > In some cases I've found that when using adding the '==' to the start of > a search as above you need to add the third parameter 'bw' to give; > > $db->AddDBParam("SomeEmail","==". $someEmail, 'bw'); > > (Note I've not tested this, I'm sitting in an airport lounge waiting for > a plane and writing this off the top of my head...let us know how you > get on) > > Cheers > Steve > > > Does any one know how to search for record that contains "@" in field > > content? > > > > In example: > > > > $db->AddDBParam("SomeEmail","some@some.com"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","eq"); > > > > or > > > > $db->AddDBParam("SomeEmail","some@some.com","cn"); > > > > > > does not work, even if you try search from FMD7 for "=some@some.com". > > What > > works from FMD7 is "==some@some.com", but I don't see equivalent for > > CWP :(. > > > > > > Thanks, > > -- > > Milos Vukotic > > Software Engineer > > MC Services > > > > > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ben at eldertreks.com Tue Oct 12 08:41:20 2004 From: ben at eldertreks.com (Ben Rollins) Date: Sat Oct 16 15:32:25 2004 Subject: [FX.php List] LinkNext - seriously, hands in the air... Message-ID: OK, I have wrestled with this over and over again, and cannot figure it out. This is a search page which works fine UNTIL you hit the next link, when I get a blank page. I know that means I screwed up, but I just can't figure out why. All I did was modify some of the code from one of FMWebSchool's php book. The code is below - can anyone tell me why the Skip breaks the page? Thanks, Hair-pulling, Ben. SetDBData('Members.fp5','cgi', $groupSize); $result = $search_result->FMFind(); if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) { $result->FMSkipRecords($_REQUEST['skip']); } ?> Member Directory
Member Directory

 

No Found Records $recordData) { ?>
CompanyIDFirst NameLast Name
     
Next"; ?> From info at softime90.com Tue Oct 12 08:56:39 2004 From: info at softime90.com (Softime90 Snc) Date: Sat Oct 16 15:32:28 2004 Subject: [FX.php List] problem: FMP in "find" mode after fx search: A password problem ! Message-ID: Hi Steve, >Some questions and thoughts...are you sure there isn't a script running >anywhere that might be leaving you in find mode...??...I presume that if >the db stays in find mode that the next request fails...??... No. I tested fmp alone , without any other client connected to server. No script at all. The "find" mode doesn't affect next WebCompanion commands (seems that web Companion bypass the current FM status), but of course the "find" mode is not exactly what I would like to have as default FM status..... >Ahh, I think I spot your problem...are you using the 'correct' version >of FX.php, you say you're using FM6 as your data source...??..but it >looks a bit to me like you're using the latest version of FX.php (I >think this because of the third parameter in > SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); I use FX 2.3.1 with Mac OSX FMP 60tv4 (Italian localized version). and Web Companion is 60v3, but I have same problem with Win client, Mac OS X client and Mac OS 9 client, and also with FM 5.5 so it's something that is not related to a special FM release. >The third parameter here is specfic to FM7 (see the FX.php docs for an >explanation) so if your data source is FM6 you need to do 2 things; > 1. remove the third parameter from SetDBData > 2. change you first line to tell FX.php it's talking to FM6 > $query1 = new FX($ip, $port, 'FMPro5/6'); >(where $ip and $port are whatever the actual variables you're storing >that info in are) I added new FX($ip, $port, 'FMPro5/6'); no difference. I tried also FX 3.0, but the result is the same. The 3rd parameter, according to FX docs, means: "how many records FX returns at once". The doc is the 2.3.1 for FM5-6. I think you were talking about $responselayout (the 4th parameter of FX3.0 docs)... But anyway the problem is here. I went on testing. If I do a FX "findall" or use as 3rd parameter "All", not only the result is OK, but FMP stands in the normal "use" mode. So the problem is related to that 3rd parameter. But I need it as I need to handle more than 50 records.... >Just some thoughts...let us know how you get on... >Steve Today I finally solved my problem. It was a problem of.......FMP password ! If the fmp password is different from the password used to start FMP Client, any search request, different from "findall" will send FPRO in "find" mode at end of processing. If the password is the same of FMP anything is fine ! I'll do other tests to see if the problem is related to the password itself or the users group ( I always have 2 groups: developer and normal user). I don't know if it's a fmp (web companion) of FX problem. Thanks for your reply Andrea > On Fri, 8 Oct 2004 10:12:56 +0200, Softime90 Snc > wrote: > > Hi to all. > > I am just starting to use FX, and have a problem after a FX search. > > Everything is done well,(I get the correct data) but at the end of a > > search, my fmpro file (version 6.04) > > remains appended in search mode. > > Can somebody point me where the mistake is ? > > thanks in advance > > Andrea > > > > $query1=new FX($ip_server_filemaker); > > > $query1->SetDBData($filemaker_db,$filemaker_layout_lista,$select_rows); > > $query1->SetDBPassword($filemaker_pwd); > > > > // search on codProv > > > > $query1->AddDBParam('codProv','RA','eq'); > > > > $query1->AddSortParam('field1'); > > $query1->AddSortParam('field2','descend'); > > $query1->FMSkipRecords($select_offset); > > $ReturnedData=$query1->FMFind(); > > > > $ReturnedData has the correct data > > > > fmpro is still in "search" mode (not in "use" mode) > > > > -- -- _______________________________________________ Softime 90 S.n.c Via Buon Pastore 5 40141 Bologna (BO), Italy tel: ++ 39.051.471057 fax: ++ 39.051.4839735 E-mail info@softime90.com From marisa at datasmithconsulting.net Thu Oct 14 10:13:45 2004 From: marisa at datasmithconsulting.net (Marisa Smith) Date: Sat Oct 16 15:32:28 2004 Subject: [FX.php List] Problem with FMEdit Message-ID: Hi All- I'm new to FX.PHP, and an "intermediate" user of PhP, so forgive me if this is a newbie question/problem. I'm trying to write a generic function that loops through the POST variable submitted on a form, adds the DB parameters and then submits an FMEdit request. I'm encountering a problem where the information is being double-entered into the database. In other words, if I change the firstname field to Judy, the data that ends up in the field is JudyJudy. I have tried to debug this myself by printing out the arrays, but I can't figure out what I'm doing wrong. The problem appears to be when I pass the array to FMEdit(), because that's there everything "goes wrong". What is strange is that if I cut and paste the XML URL generated, it works fine. Could there be a bug with the FMEdit function? Any help would be greatly appreciated. BTW - I'm using FMSA7 on Mac OS 10.3.5 Thank you. ****Here is the code snippet I am using.**** $AAHRPPDocEdit = new FX($serverIP, $webCompanionPort); $AAHRPPDocEdit->SetDBData("orcr_aahrpp.fp7", "documents"); print "
HERE ARE THE VARIABLES FROM THE POST:
"; $post=$HTTP_POST_VARS; print_r($post); print "
HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM
"; foreach ($post as $key => $value) { $AAHRPPDocEdit->AddDBParam($key,$value); print "
$key=$value
"; } print "
HERE IS THE ARRAY PASSED TO THE FMEdit function :
"; print_r($AAHRPPDocEdit); $return = $AAHRPPDocEdit->FMEdit(); print "
HERE IS THE ARRAY RETURNED FROM THE EDIT:
"; print_r($return); ****And here is what is being returned **** HERE ARE THE VARIABLES FROM THE POST: Array ( [-recid] => 3 [documentid] => 3 [contacts::first_name] => Judith [contacts::last_name] => Birk [doc_name] => irb_manual.pdf [doc_description] => My Description 3 [doc_type] => PDF ) HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM -recid=3 documentid=3 contacts::first_name=Judith contacts::last_name=Birk doc_name=irb_manual.pdf doc_description=My Description 3 doc_type=PDF HERE IS THE ARRAY PASSED TO THE FMEdit function : fx Object ( [dataServer] => 192.168.0.2 [dataServerType] => FMPro7 [dataPort] => 80 [dataPortSuffix] => :80 [database] => orcr_aahrpp.fp7 [layout] => documents [responseLayout] => [groupSize] => 50 [currentSkip] => 0 [defaultOperator] => bw [dataParams] => Array ( [0] => Array ( [name] => -recid [value] => 3 [op] => ) [1] => Array ( [name] => documentid [value] => 3 [op] => ) [2] => Array ( [name] => contacts::first_name [value] => Judith [op] => ) [3] => Array ( [name] => contacts::last_name [value] => Birk [op] => ) [4] => Array ( [name] => doc_name [value] => irb_manual.pdf [op] => ) [5] => Array ( [name] => doc_description [value] => My Description 3 [op] => ) [6] => Array ( [name] => doc_type [value] => PDF [op] => ) ) [sortParams] => Array ( ) [primaryKeyField] => [modifyDateField] => [dataKeySeparator] => [fuzzyKeyLogic] => [genericKeys] => [fieldInfo] => Array ( ) [currentData] => Array ( ) [valueLists] => Array ( ) [totalRecordCount] => -1 [foundCount] => -1 [dateFormat] => [timeFormat] => [dataURL] => [dataURLParams] => [dataQuery] => [currentFlag] => [currentRecord] => [currentField] => [currentValueList] => [fieldCount] => 0 [columnCount] => -1 [fxError] => No Action Taken [errorTracking] => 0 [DBUser] => Admin [DBPassword] => YkkYbs! [userPass] => [isPostQuery] => 1 [useCURL] => 1 [invalidXMLChars] => Array ( [0] => [1] => [2] => ) [UTF8SpecialChars] => Array ( [0] => |([-])([?-])|e [1] => |()([?-])([?-])|e [2] => |([-])([?-])([?-])|e [3] => |()([-])([?-])([?-])|e [4] => |([-])([?-])([?-])([?-])|e [5] => |()([?-])([?-])([?-])|e ) [UTF8HTMLEntities] => Array ( [0] => $this->BuildExtendedChar('\1','\2') [1] => $this->BuildExtendedChar('\1','\2','\3') [2] => $this->BuildExtendedChar('\1','\2','\3') [3] => $this->BuildExtendedChar('\1','\2','\3','\4') [4] => $this->BuildExtendedChar('\1','\2','\3','\4') [5] => $this->BuildExtendedChar('\1','\2','\3','\4') ) ) HERE IS THE ARRAY RETURNED FROM THE EDIT: Array ( [data] => Array ( [3.17] => Array ( [documentid] => Array ( [0] => 3 3 ) [unitid] => Array ( [0] => 1 ) [contactid] => Array ( [0] => 1 ) [doc_type] => Array ( [0] => PDF PDF ) [doc_description] => Array ( [0] => My Description 3 My Description 3 ) [doc_name] => Array ( [0] => irb_manual.pdf irb_manual.pdf ) [doc_name_new] => Array ( [0] => ) [upload_date] => Array ( [0] => 10/09/2004 ) [mod_date] => Array ( [0] => 10/13/2004 ) [create_date] => Array ( [0] => 10/11/2004 ) [create_contactid] => Array ( [0] => 1 ) [mod_contactid] => Array ( [0] => 1 ) [doc_comments] => Array ( [0] => Comments about this document ) [doc_status] => Array ( [0] => Active ) [contacts::first_name] => Array ( [0] => Judith Judith ) [contacts::last_name] => Array ( [0] => Birk Birk ) [contacts::uniqname] => Array ( [0] => jbirk ) ) ) [linkNext] => [linkPrevious] => [foundCount] => 1 [fields] => Array ( [0] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => documentid [type] => NUMBER [extra] => ) [1] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => unitid [type] => NUMBER [extra] => ) [2] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => contactid [type] => NUMBER [extra] => ) [3] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_type [type] => TEXT [extra] => ) [4] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_description [type] => TEXT [extra] => ) [5] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_name [type] => TEXT [extra] => ) [6] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_name_new [type] => TEXT [extra] => ) [7] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => upload_date [type] => DATE [extra] => ) [8] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => mod_date [type] => DATE [extra] => ) [9] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => create_date [type] => DATE [extra] => ) [10] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => create_contactid [type] => NUMBER [extra] => ) [11] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => mod_contactid [type] => NUMBER [extra] => ) [12] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_comments [type] => TEXT [extra] => ) [13] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_status [type] => TEXT [extra] => ) [14] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => contacts::first_name [type] => TEXT [extra] => ) [15] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => contacts::last_name [type] => TEXT [extra] => ) [16] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => contacts::uniqname [type] => TEXT [extra] => ) ) [URL] => http://Admin:YkkYbs!@192.168.0.2:80/fmi/xml/FMPXMLRESULT.xml?-db= orcr_aahrpp.fp7&-lay=documents&-max=50&-recid=3&documentid=3&contacts:: first_name=Judith&contacts::last_name=Birk&doc_name=irb_manual.pdf& doc_description=My+Description+3&doc_type=PDF&-edit [query] => [errorCode] => 0 [valueLists] => Array ( ) ) -- Marisa Smith DataSmith Consulting, LLC 667 Kuehnle Street Ann Arbor, MI 48103 PH/FAX: (734) 369-3001 marisa@datasmithconsulting.net Database Design ? Web Design ? IT Solutions Associate Member, Filemaker Solutions Alliance From brion at pobox.com Sat Oct 16 16:50:44 2004 From: brion at pobox.com (Brion Vibber) Date: Sat Oct 16 16:51:07 2004 Subject: [FX.php List] LinkNext - seriously, hands in the air... In-Reply-To: References: Message-ID: On Oct 12, 2004, at 7:41 AM, Ben Rollins wrote: > The code is below - can anyone tell me why the Skip breaks the page? You're making a method call on an array, which results in a PHP fatal error. If your server is set not to log or display error messages, it'll just die at that point with no explanation... PHP is so helpful this way. :) Instead you need to run FMSkipRecords() on the FX object before calling FMFind(), so it knows which records to fetch. > $search_result = new FX($serverIP,$webCompanionPort); > $groupSize = 10; > $search_result->SetDBData('Members.fp5','cgi', $groupSize); add here: if (isset($_REQUEST['skip'] && $_REQUEST['skip'] > 0) { $search_result->FMSkipRecords(IntVal($_REQUEST['skip'])); } (I suggest adding an IntVal() here as a general defensive programming practice; input from the web can't be trusted. Consider running htmlspecialchars() on output such as the link as well.) > $result = $search_result->FMFind(); then remove this bit: > if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) { > $result->FMSkipRecords($_REQUEST['skip']); > } -- brion vibber (brion @ pobox.com) -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20041016/a1c481eb/PGP.bin From ggt667 at gmail.com Sun Oct 17 02:57:19 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Sun Oct 17 02:57:37 2004 Subject: [FX.php List] Problem with FMEdit In-Reply-To: References: Message-ID: I do this as well, however I use "s[<>]" as the name of the field then I can do a foreach( $_REQUEST['s'] as $key => $value ) {} for the parsable ones i use "p[<>]" for the stuff that has to be parsed. ggt On Thu, 14 Oct 2004 12:13:45 -0400, Marisa Smith wrote: > Hi All- > > I'm new to FX.PHP, and an "intermediate" user of PhP, so forgive me if > this is a newbie question/problem. > > I'm trying to write a generic function that loops through the POST > variable submitted on a form, adds the DB parameters and then submits an > FMEdit request. I'm encountering a problem where the information is > being double-entered into the database. In other words, if I change > the firstname field to Judy, the data that ends up in the field is > JudyJudy. > > I have tried to debug this myself by printing out the arrays, but I > can't figure out what I'm doing wrong. The problem appears to be when I > pass the array to FMEdit(), because that's there everything "goes > wrong". What is strange is that if I cut and paste the XML URL > generated, it works fine. Could there be a bug with the FMEdit > function? > > Any help would be greatly appreciated. > > BTW - I'm using FMSA7 on Mac OS 10.3.5 > > Thank you. > > ****Here is the code snippet I am using.**** > > $AAHRPPDocEdit = new FX($serverIP, $webCompanionPort); > $AAHRPPDocEdit->SetDBData("orcr_aahrpp.fp7", "documents"); > > print "
HERE ARE THE VARIABLES FROM THE POST:
"; > $post=$HTTP_POST_VARS; > > print_r($post); > print "
HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM
"; > foreach ($post as $key => $value) { > > $AAHRPPDocEdit->AddDBParam($key,$value); > print "
$key=$value
"; > > } > > print "
HERE IS THE ARRAY PASSED TO THE FMEdit function :
"; > print_r($AAHRPPDocEdit); > > $return = $AAHRPPDocEdit->FMEdit(); > > print "
HERE IS THE ARRAY RETURNED FROM THE EDIT:
"; > print_r($return); > > ****And here is what is being returned **** > > HERE ARE THE VARIABLES FROM THE POST: > Array ( [-recid] => 3 [documentid] => 3 [contacts::first_name] => > Judith [contacts::last_name] => Birk [doc_name] => irb_manual.pdf > [doc_description] => My Description 3 [doc_type] => PDF ) > HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM > > -recid=3 > > documentid=3 > > contacts::first_name=Judith > > contacts::last_name=Birk > > doc_name=irb_manual.pdf > > doc_description=My Description 3 > > doc_type=PDF > > HERE IS THE ARRAY PASSED TO THE FMEdit function : > fx Object ( [dataServer] => 192.168.0.2 [dataServerType] => FMPro7 > [dataPort] => 80 [dataPortSuffix] => :80 [database] => orcr_aahrpp.fp7 > [layout] => documents [responseLayout] => [groupSize] => 50 > [currentSkip] => 0 [defaultOperator] => bw [dataParams] => Array ( > [0] => Array ( [name] => -recid [value] => 3 [op] => ) [1] => Array > ( [name] => documentid [value] => 3 [op] => ) [2] => Array ( > [name] => contacts::first_name [value] => Judith [op] => ) [3] => > Array ( [name] => contacts::last_name [value] => Birk [op] => ) [4] > => Array ( [name] => doc_name [value] => irb_manual.pdf [op] => ) > [5] => Array ( [name] => doc_description [value] => My Description 3 > [op] => ) [6] => Array ( [name] => doc_type [value] => PDF [op] => > ) ) [sortParams] => Array ( ) [primaryKeyField] => > [modifyDateField] => [dataKeySeparator] => [fuzzyKeyLogic] => > [genericKeys] => [fieldInfo] => Array ( ) [currentData] => Array ( > ) [valueLists] => Array ( ) [totalRecordCount] => -1 [foundCount] => > -1 [dateFormat] => [timeFormat] => [dataURL] => [dataURLParams] => > [dataQuery] => [currentFlag] => [currentRecord] => [currentField] => > [currentValueList] => [fieldCount] => 0 [columnCount] => -1 [fxError] > => No Action Taken [errorTracking] => 0 [DBUser] => Admin > [DBPassword] => YkkYbs! [userPass] => [isPostQuery] => 1 [useCURL] => > 1 [invalidXMLChars] => Array ( [0] => [1] => > [2] => ) [UTF8SpecialChars] => Array ( [0] => |([-])([?-])|e > [1] => |()([ -])([?-])|e [2] => |([-])([?-])([?-])|e [3] => > |()([-])([?-])([?-])|e [4] => |([-])([?-])([?-])([?-])|e [5] > => |()([?-])([?-])([?-])|e ) [UTF8HTMLEntities] => Array ( [0] => > $this->BuildExtendedChar('\1','\2') [1] => > $this->BuildExtendedChar('\1','\2','\3') [2] => > $this->BuildExtendedChar('\1','\2','\3') [3] => > $this->BuildExtendedChar('\1','\2','\3','\4') [4] => > $this->BuildExtendedChar('\1','\2','\3','\4') [5] => > $this->BuildExtendedChar('\1','\2','\3','\4') ) ) > HERE IS THE ARRAY RETURNED FROM THE EDIT: > Array ( [data] => Array ( [3.17] => Array ( [documentid] => Array > ( [0] => 3 3 ) [unitid] => Array ( [0] => 1 ) [contactid] => > Array ( [0] => 1 ) [doc_type] => Array ( [0] => PDF PDF ) > [doc_description] => Array ( [0] => My Description 3 My Description 3 > ) [doc_name] => Array ( [0] => irb_manual.pdf irb_manual.pdf ) > [doc_name_new] => Array ( [0] => ) [upload_date] => Array ( [0] => > 10/09/2004 ) [mod_date] => Array ( [0] => 10/13/2004 ) > [create_date] => Array ( [0] => 10/11/2004 ) [create_contactid] => > Array ( [0] => 1 ) [mod_contactid] => Array ( [0] => 1 ) > [doc_comments] => Array ( [0] => Comments about this document ) > [doc_status] => Array ( [0] => Active ) [contacts::first_name] => > Array ( [0] => Judith Judith ) [contacts::last_name] => Array ( > [0] => Birk Birk ) [contacts::uniqname] => Array ( [0] => jbirk ) > ) ) [linkNext] => [linkPrevious] => [foundCount] => 1 [fields] => > Array ( [0] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > documentid [type] => NUMBER [extra] => ) [1] => Array ( [emptyok] > => YES [maxrepeat] => 1 [name] => unitid [type] => NUMBER [extra] => > ) [2] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > contactid [type] => NUMBER [extra] => ) [3] => Array ( [emptyok] => > YES [maxrepeat] => 1 [name] => doc_type [type] => TEXT [extra] => ) > [4] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > doc_description [type] => TEXT [extra] => ) [5] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => doc_name [type] => TEXT > [extra] => ) [6] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => doc_name_new [type] => TEXT [extra] => ) [7] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => upload_date [type] => DATE > [extra] => ) [8] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => mod_date [type] => DATE [extra] => ) [9] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => create_date [type] => > DATE [extra] => ) [10] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => create_contactid [type] => NUMBER [extra] => ) [11] => Array > ( [emptyok] => YES [maxrepeat] => 1 [name] => mod_contactid [type] > => NUMBER [extra] => ) [12] => Array ( [emptyok] => YES [maxrepeat] > => 1 [name] => doc_comments [type] => TEXT [extra] => ) [13] => > Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_status > [type] => TEXT [extra] => ) [14] => Array ( [emptyok] => YES > [maxrepeat] => 1 [name] => contacts::first_name [type] => TEXT > [extra] => ) [15] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => contacts::last_name [type] => TEXT [extra] => ) [16] => > Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > contacts::uniqname [type] => TEXT [extra] => ) ) [URL] => > http://Admin:YkkYbs!@192.168.0.2:80/fmi/xml/FMPXMLRESULT.xml?-db= > orcr_aahrpp.fp7&-lay=documents&-max=50&-recid=3&documentid=3&contacts:: > first_name=Judith&contacts::last_name=Birk&doc_name=irb_manual.pdf& > doc_description=My+Description+3&doc_type=PDF&-edit [query] => > [errorCode] => 0 [valueLists] => Array ( ) ) > > -- > Marisa Smith > DataSmith Consulting, LLC > 667 Kuehnle Street > Ann Arbor, MI 48103 > PH/FAX: (734) 369-3001 > marisa@datasmithconsulting.net > Database Design ? Web Design ? IT Solutions > > Associate Member, Filemaker Solutions Alliance > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ggt667 at gmail.com Sun Oct 17 02:58:57 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Sun Oct 17 02:59:13 2004 Subject: [FX.php List] Problem with FMEdit In-Reply-To: References: Message-ID: I realize that my previous post does not answer your question, please check authentication, does the username/password match the database worked on? ggt On Thu, 14 Oct 2004 12:13:45 -0400, Marisa Smith wrote: > Hi All- > > I'm new to FX.PHP, and an "intermediate" user of PhP, so forgive me if > this is a newbie question/problem. > > I'm trying to write a generic function that loops through the POST > variable submitted on a form, adds the DB parameters and then submits an > FMEdit request. I'm encountering a problem where the information is > being double-entered into the database. In other words, if I change > the firstname field to Judy, the data that ends up in the field is > JudyJudy. > > I have tried to debug this myself by printing out the arrays, but I > can't figure out what I'm doing wrong. The problem appears to be when I > pass the array to FMEdit(), because that's there everything "goes > wrong". What is strange is that if I cut and paste the XML URL > generated, it works fine. Could there be a bug with the FMEdit > function? > > Any help would be greatly appreciated. > > BTW - I'm using FMSA7 on Mac OS 10.3.5 > > Thank you. > > ****Here is the code snippet I am using.**** > > $AAHRPPDocEdit = new FX($serverIP, $webCompanionPort); > $AAHRPPDocEdit->SetDBData("orcr_aahrpp.fp7", "documents"); > > print "
HERE ARE THE VARIABLES FROM THE POST:
"; > $post=$HTTP_POST_VARS; > > print_r($post); > print "
HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM
"; > foreach ($post as $key => $value) { > > $AAHRPPDocEdit->AddDBParam($key,$value); > print "
$key=$value
"; > > } > > print "
HERE IS THE ARRAY PASSED TO THE FMEdit function :
"; > print_r($AAHRPPDocEdit); > > $return = $AAHRPPDocEdit->FMEdit(); > > print "
HERE IS THE ARRAY RETURNED FROM THE EDIT:
"; > print_r($return); > > ****And here is what is being returned **** > > HERE ARE THE VARIABLES FROM THE POST: > Array ( [-recid] => 3 [documentid] => 3 [contacts::first_name] => > Judith [contacts::last_name] => Birk [doc_name] => irb_manual.pdf > [doc_description] => My Description 3 [doc_type] => PDF ) > HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM > > -recid=3 > > documentid=3 > > contacts::first_name=Judith > > contacts::last_name=Birk > > doc_name=irb_manual.pdf > > doc_description=My Description 3 > > doc_type=PDF > > HERE IS THE ARRAY PASSED TO THE FMEdit function : > fx Object ( [dataServer] => 192.168.0.2 [dataServerType] => FMPro7 > [dataPort] => 80 [dataPortSuffix] => :80 [database] => orcr_aahrpp.fp7 > [layout] => documents [responseLayout] => [groupSize] => 50 > [currentSkip] => 0 [defaultOperator] => bw [dataParams] => Array ( > [0] => Array ( [name] => -recid [value] => 3 [op] => ) [1] => Array > ( [name] => documentid [value] => 3 [op] => ) [2] => Array ( > [name] => contacts::first_name [value] => Judith [op] => ) [3] => > Array ( [name] => contacts::last_name [value] => Birk [op] => ) [4] > => Array ( [name] => doc_name [value] => irb_manual.pdf [op] => ) > [5] => Array ( [name] => doc_description [value] => My Description 3 > [op] => ) [6] => Array ( [name] => doc_type [value] => PDF [op] => > ) ) [sortParams] => Array ( ) [primaryKeyField] => > [modifyDateField] => [dataKeySeparator] => [fuzzyKeyLogic] => > [genericKeys] => [fieldInfo] => Array ( ) [currentData] => Array ( > ) [valueLists] => Array ( ) [totalRecordCount] => -1 [foundCount] => > -1 [dateFormat] => [timeFormat] => [dataURL] => [dataURLParams] => > [dataQuery] => [currentFlag] => [currentRecord] => [currentField] => > [currentValueList] => [fieldCount] => 0 [columnCount] => -1 [fxError] > => No Action Taken [errorTracking] => 0 [DBUser] => Admin > [DBPassword] => YkkYbs! [userPass] => [isPostQuery] => 1 [useCURL] => > 1 [invalidXMLChars] => Array ( [0] => [1] => > [2] => ) [UTF8SpecialChars] => Array ( [0] => |([-])([?-])|e > [1] => |()([ -])([?-])|e [2] => |([-])([?-])([?-])|e [3] => > |()([-])([?-])([?-])|e [4] => |([-])([?-])([?-])([?-])|e [5] > => |()([?-])([?-])([?-])|e ) [UTF8HTMLEntities] => Array ( [0] => > $this->BuildExtendedChar('\1','\2') [1] => > $this->BuildExtendedChar('\1','\2','\3') [2] => > $this->BuildExtendedChar('\1','\2','\3') [3] => > $this->BuildExtendedChar('\1','\2','\3','\4') [4] => > $this->BuildExtendedChar('\1','\2','\3','\4') [5] => > $this->BuildExtendedChar('\1','\2','\3','\4') ) ) > HERE IS THE ARRAY RETURNED FROM THE EDIT: > Array ( [data] => Array ( [3.17] => Array ( [documentid] => Array > ( [0] => 3 3 ) [unitid] => Array ( [0] => 1 ) [contactid] => > Array ( [0] => 1 ) [doc_type] => Array ( [0] => PDF PDF ) > [doc_description] => Array ( [0] => My Description 3 My Description 3 > ) [doc_name] => Array ( [0] => irb_manual.pdf irb_manual.pdf ) > [doc_name_new] => Array ( [0] => ) [upload_date] => Array ( [0] => > 10/09/2004 ) [mod_date] => Array ( [0] => 10/13/2004 ) > [create_date] => Array ( [0] => 10/11/2004 ) [create_contactid] => > Array ( [0] => 1 ) [mod_contactid] => Array ( [0] => 1 ) > [doc_comments] => Array ( [0] => Comments about this document ) > [doc_status] => Array ( [0] => Active ) [contacts::first_name] => > Array ( [0] => Judith Judith ) [contacts::last_name] => Array ( > [0] => Birk Birk ) [contacts::uniqname] => Array ( [0] => jbirk ) > ) ) [linkNext] => [linkPrevious] => [foundCount] => 1 [fields] => > Array ( [0] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > documentid [type] => NUMBER [extra] => ) [1] => Array ( [emptyok] > => YES [maxrepeat] => 1 [name] => unitid [type] => NUMBER [extra] => > ) [2] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > contactid [type] => NUMBER [extra] => ) [3] => Array ( [emptyok] => > YES [maxrepeat] => 1 [name] => doc_type [type] => TEXT [extra] => ) > [4] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > doc_description [type] => TEXT [extra] => ) [5] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => doc_name [type] => TEXT > [extra] => ) [6] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => doc_name_new [type] => TEXT [extra] => ) [7] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => upload_date [type] => DATE > [extra] => ) [8] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => mod_date [type] => DATE [extra] => ) [9] => Array ( > [emptyok] => YES [maxrepeat] => 1 [name] => create_date [type] => > DATE [extra] => ) [10] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => create_contactid [type] => NUMBER [extra] => ) [11] => Array > ( [emptyok] => YES [maxrepeat] => 1 [name] => mod_contactid [type] > => NUMBER [extra] => ) [12] => Array ( [emptyok] => YES [maxrepeat] > => 1 [name] => doc_comments [type] => TEXT [extra] => ) [13] => > Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_status > [type] => TEXT [extra] => ) [14] => Array ( [emptyok] => YES > [maxrepeat] => 1 [name] => contacts::first_name [type] => TEXT > [extra] => ) [15] => Array ( [emptyok] => YES [maxrepeat] => 1 > [name] => contacts::last_name [type] => TEXT [extra] => ) [16] => > Array ( [emptyok] => YES [maxrepeat] => 1 [name] => > contacts::uniqname [type] => TEXT [extra] => ) ) [URL] => > http://Admin:YkkYbs!@192.168.0.2:80/fmi/xml/FMPXMLRESULT.xml?-db= > orcr_aahrpp.fp7&-lay=documents&-max=50&-recid=3&documentid=3&contacts:: > first_name=Judith&contacts::last_name=Birk&doc_name=irb_manual.pdf& > doc_description=My+Description+3&doc_type=PDF&-edit [query] => > [errorCode] => 0 [valueLists] => Array ( ) ) > > -- > Marisa Smith > DataSmith Consulting, LLC > 667 Kuehnle Street > Ann Arbor, MI 48103 > PH/FAX: (734) 369-3001 > marisa@datasmithconsulting.net > Database Design ? Web Design ? IT Solutions > > Associate Member, Filemaker Solutions Alliance > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ggt667 at gmail.com Sun Oct 17 03:01:05 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Sun Oct 17 03:01:21 2004 Subject: [FX.php List] LinkNext - seriously, hands in the air... In-Reply-To: References: Message-ID: I have never used the internal linkNext/linkPrevious function, I always use my own: Please take a look at: http://ext.comitas.no/index.phps ggt On Sat, 16 Oct 2004 15:50:44 -0700, Brion Vibber wrote: > On Oct 12, 2004, at 7:41 AM, Ben Rollins wrote: > > The code is below - can anyone tell me why the Skip breaks the page? > > You're making a method call on an array, which results in a PHP fatal > error. If your server is set not to log or display error messages, > it'll just die at that point with no explanation... PHP is so helpful > this way. :) > > Instead you need to run FMSkipRecords() on the FX object before calling > FMFind(), so it knows which records to fetch. > > > $search_result = new FX($serverIP,$webCompanionPort); > > $groupSize = 10; > > $search_result->SetDBData('Members.fp5','cgi', $groupSize); > > add here: > if (isset($_REQUEST['skip'] && $_REQUEST['skip'] > 0) { > $search_result->FMSkipRecords(IntVal($_REQUEST['skip'])); > } > > (I suggest adding an IntVal() here as a general defensive programming > practice; input from the web can't be trusted. Consider running > htmlspecialchars() on output such as the link as well.) > > > $result = $search_result->FMFind(); > > then remove this bit: > > if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) { > > $result->FMSkipRecords($_REQUEST['skip']); > > } > > -- brion vibber (brion @ pobox.com) > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > From marisa at datasmithconsulting.net Sun Oct 17 14:52:38 2004 From: marisa at datasmithconsulting.net (Marisa Smith) Date: Sun Oct 17 14:53:03 2004 Subject: [FX.php List] Problem with FMEdit duplicate entries - solution! In-Reply-To: Message-ID: I figured out the problem after finally searching for the right keyword in the FX forum/bulletin board. Someone else had a similar problem using FMNew() which I didn't find because I was looking for FMEdit() in the message posts. Anyway, the solution is to call FMUseCURL(false); before you start setting DBParams....like this: $mod_main = new FX($serverIP, $webCompanionPort, $dataServerType); $mod_main->FMUseCURL(false); $mod_main->SetDBData("orcr_aahrpp.fp7", "documents"); foreach ($_POST as $key => $value) { $mod_main->AddDBParam($key,$value); } Now it works like a charm!! Thanks for the suggestions. - Marisa -- Marisa Smith DataSmith Consulting, LLC 667 Kuehnle Street Ann Arbor, MI 48103 PH/FAX: (734) 369-3001 marisa@datasmithconsulting.net Database Design ? Web Design ? IT Solutions Associate Member, Filemaker Solutions Alliance From kfutter at sbc.melb.catholic.edu.au Sun Oct 17 17:35:03 2004 From: kfutter at sbc.melb.catholic.edu.au (Kevin Futter) Date: Sun Oct 17 17:37:45 2004 Subject: [FX.php List] LinkNext - seriously, hands in the air... In-Reply-To: Message-ID: Hi Ben, I think you need to change this line: $result->FMSkipRecords($_REQUEST['skip']); to: $search_result->FMSkipRecords($_REQUEST['skip']); Also, the statement that does the actual find ($result = $search_result->FMFind();) needs to be the very last statement (hence my suggestion above). At least, that's how I understand it! I actually put the $_REQUEST['skip'] variable into another variable called $skip and then use that as FMSkipRecords($skip). Cheers, Kevin On 13/10/04 12:41 AM, "Ben Rollins" wrote: > OK, I have wrestled with this over and over again, and cannot figure it > out. > > This is a search page which works fine UNTIL you hit the next link, when I > get a blank page. I know that means I screwed up, but I just can't figure > out why. All I did was modify some of the code from one of FMWebSchool's > php book. > > The code is below - can anyone tell me why the Skip breaks the page? > > Thanks, > > Hair-pulling, > > Ben. > > include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FX.php"); > include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/server_data.php"); > include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FMErrors.php"); > > $search_result = new FX($serverIP,$webCompanionPort); > $groupSize = 10; > $search_result->SetDBData('Members.fp5','cgi', $groupSize); > $result = $search_result->FMFind(); > > if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) { > $result->FMSkipRecords($_REQUEST['skip']); > } > ?> > > > > Member Directory > > > > marginwidth="0" marginheight="0"> > bgcolor="#000099"> > > > >
Member > Directory
>
>

>

 

> if ($result['foundCount']==0) { > ?> > No Found Records > }else{ > ?> > bgcolor=#FFFFCC> > > foreach ($result['data'] as $recordKey =>$recordData) { > ?> > > > > > > } > ?> >
CompanyIDFirst NameLast Name
$recordData['company_id'][0];?>   
> > Next"; ?> > > > } > ?> > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From hawksworth-2 at medctr.osu.edu Tue Oct 19 10:46:41 2004 From: hawksworth-2 at medctr.osu.edu (Kim Hawksworth) Date: Tue Oct 19 16:52:19 2004 Subject: [FX.php List] Another Question Regarding LinkNext/LinkPrevious Message-ID: Greetings Fellow List Members, I'm trying to do a LinkNext/LinkPrevious from an FMFind(); My code looks like this: SetDBData("resident_directory.fp5", "detail", "25"); $resident_search->AddDBParam("Lname", "$Lname"); $resident_search->AddDBParam("fname", "$fname"); $resident_search->AddDBParam("year_grad", "$year_grad"); $resident_search->AddDBParam("state", "$state"); $resident_search->AddDBParam("restype", "$restype"); $resident_search->AddSortParam("year_grad", "ascend"); if (isset($_GET['skip'])) { $currentSkip = $_GET['skip']; } else { $currentSkip = 0; } $resident_search->FMSkipRecords($currentSkip); $search_results = $resident_search->FMFind(); ?> The code at the bottom of the page looks like this: Next Results This code works fine with FMFindAll(), however, on the FMFind(); the LinkNext button returns no results instead of the next 25 records. I've tried other variations posted to the list for the isset statement with the same results. What I'm I doing wrong? Thanks in advance for you help. --Kim Kim David Hawksworth, R.Ph., Web Manager The Ohio State University Medical Center Department of Pharmacy From lmiranda at gmail.com Thu Oct 21 00:42:06 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 21 00:42:16 2004 Subject: [FX.php List] extracting data from fx.php arrays problem.. Message-ID: <5016fc50410202342245d2507@mail.gmail.com> i have this code, which dont work i dont know why.. i did type the correct field for the layout and the field for the data. Im trying to get the "Email_No" but it wont get the data. the print_r, shows all the data fine though. ## $filename = "041021_hadda.pdf"; $query = new FX("192.168.0.1", "8080"); $query -> SetDBData("agencies.fp5", "AllFields"); $query -> AddDBParam('Filename', $filename); $data = $query->FMFind(); print("
");
print_r($data);
print("
"); $emailnum = $data['Email_No']; print("

email num: $emailnum "); ## -- Louie Miranda http://www.axishift.com From lmiranda at gmail.com Thu Oct 21 01:06:38 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 21 01:33:25 2004 Subject: [FX.php List] Re: extracting data from fx.php arrays problem.. In-Reply-To: <5016fc50410202342245d2507@mail.gmail.com> References: <5016fc50410202342245d2507@mail.gmail.com> Message-ID: <5016fc504102100061ddfd312@mail.gmail.com> Also i did try this.. $data = $query->FMFind(); $emailnum = $data['Email_No']['0']; echo $emailnum; but still did not work. On Thu, 21 Oct 2004 14:42:06 +0800, Louie Miranda wrote: > i have this code, which dont work i dont know why.. i did type the > correct field for the layout and the field for the data. Im trying to > get the "Email_No" but it wont get the data. > > the print_r, shows all the data fine though. > > ## > $filename = "041021_hadda.pdf"; > > $query = new FX("192.168.0.1", "8080"); > $query -> SetDBData("agencies.fp5", "AllFields"); > $query -> AddDBParam('Filename', $filename); > $data = $query->FMFind(); > > print("
");
> print_r($data);
> print("
"); > > $emailnum = $data['Email_No']; > > print(" >

> email num: $emailnum > "); > ## > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com From lmiranda at gmail.com Thu Oct 21 01:28:36 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Thu Oct 21 01:35:22 2004 Subject: [FX.php List] Re: extracting data from fx.php arrays problem.. In-Reply-To: <5016fc504102100061ddfd312@mail.gmail.com> References: <5016fc50410202342245d2507@mail.gmail.com> <5016fc504102100061ddfd312@mail.gmail.com> Message-ID: <5016fc504102100283443809@mail.gmail.com> OH MAN I SOLVED IT!!! foreach ($data['data'] as $recordKey => $recordData) { $emailnum = $recordData['Email_No']['0']; print("

email num: $emailnum "); } yahoo!! On Thu, 21 Oct 2004 15:06:38 +0800, Louie Miranda wrote: > Also i did try this.. > > $data = $query->FMFind(); > $emailnum = $data['Email_No']['0']; > echo $emailnum; > > but still did not work. > > > > > On Thu, 21 Oct 2004 14:42:06 +0800, Louie Miranda wrote: > > i have this code, which dont work i dont know why.. i did type the > > correct field for the layout and the field for the data. Im trying to > > get the "Email_No" but it wont get the data. > > > > the print_r, shows all the data fine though. > > > > ## > > $filename = "041021_hadda.pdf"; > > > > $query = new FX("192.168.0.1", "8080"); > > $query -> SetDBData("agencies.fp5", "AllFields"); > > $query -> AddDBParam('Filename', $filename); > > $data = $query->FMFind(); > > > > print("
");
> > print_r($data);
> > print("
"); > > > > $emailnum = $data['Email_No']; > > > > print(" > >

> > email num: $emailnum > > "); > > ## > > > > -- > > Louie Miranda > > http://www.axishift.com > > > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com From nick at mail.crlibrary.org Thu Oct 21 15:07:25 2004 From: nick at mail.crlibrary.org (Nick Trenary) Date: Thu Oct 21 15:07:07 2004 Subject: [FX.php List] fx/php newbie Message-ID: <6.0.0.22.0.20041021155551.01f7d6a8@mail.crlibrary.org> I'm just starting to get my feet with php and FileMaker. Php and FM are both set up correctly. I have been able to show an array of a search using 'print_r ($results)' . I understand the concept arrays but am unclear as to how to write the code to print the results on a web page. Sort of loop will be needed, that I understand too. But how is the code for the array written to 'cycle' through each record? This is probably a very elementary bit of code but I cannot find any documentation or example for this. Can anyone steer me in the right direction? Thanks, Nick ---- Nick Trenary Computer Information Systems Analyst Cedar Rapids Public Library Office:(319) 398-5145 x267 Work cell: (319) 310-7699 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041021/37190724/attachment.html From jason at stravinsoft.com Thu Oct 21 15:36:58 2004 From: jason at stravinsoft.com (Jason H.Awbrey) Date: Thu Oct 21 15:37:19 2004 Subject: [FX.php List] fx/php newbie In-Reply-To: <6.0.0.22.0.20041021155551.01f7d6a8@mail.crlibrary.org> References: <6.0.0.22.0.20041021155551.01f7d6a8@mail.crlibrary.org> Message-ID: <5E171E3C-23A9-11D9-81A0-000A9592DE20@stravinsoft.com> Hi Nick, Here is a a simple example of the basics you would need to return a found set from FileMaker with FX.php: //query to retrieve records $query = new FX($serverIP, $webCompanionPort); $query->SetDBData("DatabaseName", "LayoutName"); $query->SetDBPassword('password', 'username'); $query->AddDBParam('fieldname', 'value your are searching for'); $query->AddDBParam('related::fieldname', 'test'); $query->AddSortParam('sortField', 'ascend'); $result = $query->FMFind(); $currentKey = key($result['data']); Then, when you want to loop through the record set: if ($result['foundCount'] > 0) { foreach ($result['data'] as $key => $value) { echo $value['fieldName'] . "
"; } } This is pretty basic but it should get you started. HTH, Jason H. Awbrey StravinSOFT, Incorporated http://www.stravinsoft.com On Oct 21, 2004, at 4:07 PM, Nick Trenary wrote: > I'm just starting to get my feet with php and FileMaker.? Php and FM > are both set up correctly.? I have been able to show an array of a > search using 'print_r ($results)' .? I understand the concept arrays > but am unclear as to how to write the code to print the results on a > web page.? Sort of loop will be needed, that I understand too.? But > how is the code for the array written to 'cycle' through each record?? > This is probably a very elementary bit of code but I cannot find any > documentation or example for this.? Can anyone steer me in the right > direction? > > Thanks, > Nick > > > ---- > Nick Trenary > Computer Information Systems Analyst > Cedar Rapids Public Library > Office:(319) 398-5145 x267 > Work cell: (319) 310-7699 > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2371 bytes Desc: not available Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20041021/979a0eb3/smime.bin From prouleau at grouped3.com Thu Oct 21 16:24:58 2004 From: prouleau at grouped3.com (philippe rouleau) Date: Thu Oct 21 19:07:50 2004 Subject: [FX.php List] Notice: Undefined index Message-ID: <000801c4b7bc$f13280d0$c176fea9@prouleau> I Have a field Called "Project Code" that is on the layout that is defined in PHP ($InstanceName->setDBData('condos_.fp5','Liste de Prix des Condos Copy',100);) , I have a problem when I want to display it using the following : echo $InstanceData['Project code'][0]; I get a message "Notice: Undefined index: Project code in C:\Program Files\Apache Group\Apache2\htdocs\form4.php on line 30". All the other field I'm using are working OK. I verified that "Project code" is written exactly the same with the small cap on the "c" of code. Is there a something that I'm missing ? Here is the total php code SetDBPassword('0rf0rd'); $InstanceName->setDBData('condos_.fp5','Liste de Prix des Condos Copy',100); $projectcode = "chevalier"; $InstanceName->AddDBParam('project code', $projectcode); $InstanceResult = $InstanceName->FMFind(); echo $InstanceResult['foundCount']; echo $InstanceResult['errorCode']; foreach ($InstanceResult['data'] as $key => $InstanceData) { ?> Condo : Statut : Prix Vendus :
Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041021/ef41eaa1/attachment.html From steve at bluecrocodile.co.nz Thu Oct 21 19:28:54 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Thu Oct 21 19:29:11 2004 Subject: [FX.php List] Notice: Undefined index In-Reply-To: <000801c4b7bc$f13280d0$c176fea9@prouleau> References: <000801c4b7bc$f13280d0$c176fea9@prouleau> Message-ID: One thing I find useful to do in this situation is to do a print_r of the data which is returned, which will show the actual index names of your array... if you insert; echo "
";
print_r($InstanceResult['data']);
echo "
"; after the line > echo $InstanceResult['errorCode']; in your code, then comment out the entire 'for' code block, you'll get both the keys and the values of 'data' displayed which will let you verify that 'Project codes' in whichever combination of caps it might be in, is included in the found data... Hope this helps... Steve -----Original Message----- From: "philippe rouleau" To: Date: Thu, 21 Oct 2004 18:24:58 -0400 Subject: [FX.php List] Notice: Undefined index > I Have a field Called "Project Code" that is on the layout that is > defined in PHP ($InstanceName->setDBData('condos_.fp5','Liste de Prix > des Condos Copy',100);) , I have a problem when I want to display it > using the following : > > echo $InstanceData['Project code'][0]; > > I get a message "Notice: Undefined index: Project code in C:\Program > Files\Apache Group\Apache2\htdocs\form4.php on line 30". > > All the other field I'm using are working OK. I verified that "Project > code" is written exactly the same with the small cap on the "c" of > code. > > Is there a something that I'm missing ? > > Here is the total php code > > $color = "blue and VIAU" ; > $color_two=$color ; > echo $color_two ; > include_once("fx/fx.php"); > include_once("fx/server_data.php"); > include_once("fx/FMErrors.php"); > include_once("header.php"); > $InstanceName=new FX($serverIP,$webCompanionPort); > $InstanceName->SetDBPassword('0rf0rd'); > > $InstanceName->setDBData('condos_.fp5','Liste de Prix des Condos > Copy',100); > > $projectcode = "chevalier"; > $InstanceName->AddDBParam('project code', $projectcode); > > > $InstanceResult = $InstanceName->FMFind(); > echo $InstanceResult['foundCount']; > echo $InstanceResult['errorCode']; > foreach ($InstanceResult['data'] as $key => $InstanceData) > { > ?> > Condo : > echo $InstanceData['Condo'][0]; > ?> > Statut : > echo $InstanceData['Project code'][0]; > ?> > Prix Vendus : > echo $InstanceData['Prix Vendu Condo'][0]; > ?> >
> } > ?> > > > Thanks in Advance > From lmiranda at gmail.com Fri Oct 22 01:14:57 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Fri Oct 22 01:15:08 2004 Subject: [FX.php List] Editing a found value Message-ID: <5016fc504102200144925aa60@mail.gmail.com> I do find the values im looking for using this.. //find $query = new FX("192.168.0.90", "8080"); $query -> SetDBData("Agencies.fp5", "AllFields"); $query -> AddDBParam('Filename', $catchfile); $data1 = $query->FMFind(); print("
");
print_r($data1);
print("
"); 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("
");
print_r($data2);
print("
"); how do i edit a found row? -- Louie Miranda http://www.axishift.com From lmiranda at gmail.com Fri Oct 22 01:34:54 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Fri Oct 22 01:35:05 2004 Subject: [FX.php List] fx/php newbie In-Reply-To: <5E171E3C-23A9-11D9-81A0-000A9592DE20@stravinsoft.com> References: <6.0.0.22.0.20041021155551.01f7d6a8@mail.crlibrary.org> <5E171E3C-23A9-11D9-81A0-000A9592DE20@stravinsoft.com> Message-ID: <5016fc50410220034945e12c@mail.gmail.com> how about editing? the -recid seems to be complicated. On Thu, 21 Oct 2004 16:36:58 -0500, Jason H. Awbrey wrote: > Hi Nick, > > Here is a a simple example of the basics you would need to return a > found set from FileMaker with FX.php: > > //query to retrieve records > $query = new FX($serverIP, $webCompanionPort); > $query->SetDBData("DatabaseName", "LayoutName"); > $query->SetDBPassword('password', 'username'); > $query->AddDBParam('fieldname', 'value your are searching for'); > $query->AddDBParam('related::fieldname', 'test'); > $query->AddSortParam('sortField', 'ascend'); > $result = $query->FMFind(); > $currentKey = key($result['data']); > > Then, when you want to loop through the record set: > > if ($result['foundCount'] > 0) { > foreach ($result['data'] as $key => $value) { > echo $value['fieldName'] . "
"; > } > } > > This is pretty basic but it should get you started. > > HTH, > Jason H. Awbrey > StravinSOFT, Incorporated > http://www.stravinsoft.com > > > > > On Oct 21, 2004, at 4:07 PM, Nick Trenary wrote: > > > I'm just starting to get my feet with php and FileMaker. Php and FM > > are both set up correctly. I have been able to show an array of a > > search using 'print_r ($results)' . I understand the concept arrays > > but am unclear as to how to write the code to print the results on a > > web page. Sort of loop will be needed, that I understand too. But > > how is the code for the array written to 'cycle' through each record? > > This is probably a very elementary bit of code but I cannot find any > > documentation or example for this. Can anyone steer me in the right > > direction? > > > > Thanks, > > Nick > > > > > > ---- > > Nick Trenary > > Computer Information Systems Analyst > > Cedar Rapids Public Library > > Office:(319) 398-5145 x267 > > Work cell: (319) 310-7699 > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > -- Louie Miranda http://www.axishift.com From steve at bluecrocodile.co.nz Fri Oct 22 01:38:07 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 22 01:39:04 2004 Subject: [FX.php List] Editing a found value In-Reply-To: <5016fc504102200144925aa60@mail.gmail.com> Message-ID: <006501c4b80a$1601ffb0$0c00a8c0@bluecrocodile.co.nz> 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("
");
> print_r($data1);
> print("
"); > > 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("
");
> print_r($data2);
> print("
"); > > > how do i edit a found row? > > -- > Louie Miranda > http://www.axishift.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > From lmiranda at gmail.com Fri Oct 22 02:02:26 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Fri Oct 22 02:02:35 2004 Subject: [FX.php List] Editing a found value In-Reply-To: <006501c4b80a$1601ffb0$0c00a8c0@bluecrocodile.co.nz> References: <5016fc504102200144925aa60@mail.gmail.com> <006501c4b80a$1601ffb0$0c00a8c0@bluecrocodile.co.nz> Message-ID: <5016fc5041022010256b21054@mail.gmail.com> 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 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("
");
> > print_r($data1);
> > print("
"); > > > > 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("
");
> > print_r($data2);
> > print("
"); > > > > > > how do i edit a found row? > > > > -- > > Louie Miranda > > http://www.axishift.com > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > > > -- Louie Miranda http://www.axishift.com From lmiranda at gmail.com Fri Oct 22 02:03:25 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Fri Oct 22 02:03:33 2004 Subject: [FX.php List] Editing a found value In-Reply-To: <5016fc5041022010256b21054@mail.gmail.com> References: <5016fc504102200144925aa60@mail.gmail.com> <006501c4b80a$1601ffb0$0c00a8c0@bluecrocodile.co.nz> <5016fc5041022010256b21054@mail.gmail.com> Message-ID: <5016fc5041022010372e0f629@mail.gmail.com> 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 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 > 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("
");
> > > print_r($data1);
> > > print("
"); > > > > > > 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("
");
> > > print_r($data2);
> > > print("
"); > > > > > > > > > how do i edit a found row? > > > > > > -- > > > Louie Miranda > > > http://www.axishift.com > > > _______________________________________________ > > > FX.php_List mailing list > > > FX.php_List@mail.iviking.org > > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > > > > > > > > > -- > Louie Miranda > http://www.axishift.com > -- Louie Miranda http://www.axishift.com From log-out at yacobi.com Fri Oct 22 03:05:58 2004 From: log-out at yacobi.com (Log-Out) Date: Fri Oct 22 03:06:38 2004 Subject: [FX.php List] Editing a found value In-Reply-To: <5016fc5041022010372e0f629@mail.gmail.com> References: <5016fc504102200144925aa60@mail.gmail.com> <006501c4b80a$1601ffb0$0c00a8c0@bluecrocodile.co.nz> <5016fc5041022010256b21054@mail.gmail.com> <5016fc5041022010372e0f629@mail.gmail.com> Message-ID: <96DB921A-2409-11D9-95F1-000A959E46DE@yacobi.com> 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 > 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 >> 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("
");
>>>> print_r($data1);
>>>> print("
"); >>>> >>>> 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("
");
>>>> print_r($data2);
>>>> print("
"); >>>> >>>> >>>> how do i edit a found row? >>>> >>>> -- >>>> Louie Miranda >>>> http://www.axishift.com From nick at mail.crlibrary.org Fri Oct 22 08:16:12 2004 From: nick at mail.crlibrary.org (Nick Trenary) Date: Fri Oct 22 08:16:29 2004 Subject: [FX.php List] fx/php newbie In-Reply-To: <5E171E3C-23A9-11D9-81A0-000A9592DE20@stravinsoft.com> References: <6.0.0.22.0.20041021155551.01f7d6a8@mail.crlibrary.org> <5E171E3C-23A9-11D9-81A0-000A9592DE20@stravinsoft.com> Message-ID: <6.0.0.22.0.20041022091518.01e85f38@mail.crlibrary.org> That is exactly what I need. I simply could not figure out how to view the fields. Thanks for your help! Nick At 04:36 PM 10/21/2004, you wrote: >Hi Nick, > >Here is a a simple example of the basics you would need to return a found >set from FileMaker with FX.php: > >//query to retrieve records >$query = new FX($serverIP, $webCompanionPort); >$query->SetDBData("DatabaseName", "LayoutName"); >$query->SetDBPassword('password', 'username'); >$query->AddDBParam('fieldname', 'value your are searching for'); >$query->AddDBParam('related::fieldname', 'test'); >$query->AddSortParam('sortField', 'ascend'); >$result = $query->FMFind(); >$currentKey = key($result['data']); > >Then, when you want to loop through the record set: > >if ($result['foundCount'] > 0) { > foreach ($result['data'] as $key => $value) { > echo $value['fieldName'] . "
"; > } >} > >This is pretty basic but it should get you started. > >HTH, >Jason H. Awbrey >StravinSOFT, Incorporated >http://www.stravinsoft.com > > > >On Oct 21, 2004, at 4:07 PM, Nick Trenary wrote: > >> I'm just starting to get my feet with php and FileMaker. Php and FM >> are both set up correctly. I have been able to show an array of a >> search using 'print_r ($results)' . I understand the concept arrays but >> am unclear as to how to write the code to print the results on a web >> page. Sort of loop will be needed, that I understand too. But how is >> the code for the array written to 'cycle' through each record? This is >> probably a very elementary bit of code but I cannot find any >> documentation or example for this. Can anyone steer me in the right direction? >> >> Thanks, >> Nick >> >> >> ---- >> Nick Trenary >> Computer Information Systems Analyst >>Cedar Rapids Public Library >>Office:(319) 398-5145 x267 >> Work cell: (319) 310-7699 >>_______________________________________________ >>FX.php_List mailing list >>FX.php_List@mail.iviking.org >>http://www.iviking.org/mailman/listinfo/fx.php_list > > > >_______________________________________________ >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list From dennis-crall at uiowa.edu Mon Oct 25 12:11:34 2004 From: dennis-crall at uiowa.edu (Dennis Crall) Date: Mon Oct 25 12:11:53 2004 Subject: [FX.php List] Crashing Filemaker Message-ID: Hello, I've created a FX.php script that runs from the command line. What it does is this: 1. Grabs all records, 215 in all, from the database. The database only contains 6 text fields, so there's not a lot of information. 2. Iterates over all the records. For each record the script: a. Makes an LDAP query. b. Updates the record. c. Writes the record back to the database. The script works fine for 2/3 of the records but eventually FileMaker (6.0.3 Developer) crashes. It crashes such that I have to force quit the application and then recover the database. Unfortunately, I'm left with no error messages. It seems like the problem is with FileMaker and not my script. I have been unable to narrow the problem to a specific record, and the script runs fine if I narrow the original search. Is this too much load for FMP? Would Unlimited do better? Are there other pitfalls I should be investigating? Thank you, Dennis Crall ITS-Academic Technologies University of Iowa From dbengston at preservationstudio.com Mon Oct 25 13:26:48 2004 From: dbengston at preservationstudio.com (Dale Bengston) Date: Mon Oct 25 13:27:05 2004 Subject: [FX.php List] Crashing Filemaker Message-ID: Hi Dennis, I would strongly suggest updating your copy of FMP to 6.0v4 and then see if the problems persist. Also, update your Web Companion Extension to 6.0v3. The updaters (Mac and Windows) may be found at . Hope this helps, Dale -- Dale Bengston | Streamline Studio, LLC | dbengston@streamline-studio.com Associate Member, FileMaker Solutions Alliance On Oct 25, 2004, at 1:11 PM, Dennis Crall wrote: > Hello, > > I've created a FX.php script that runs from the command line. What it > does > is this: > > 1. Grabs all records, 215 in all, from the database. The database only > contains 6 text fields, so there's not a lot of information. > > 2. Iterates over all the records. For each record the script: > > a. Makes an LDAP query. > > b. Updates the record. > > c. Writes the record back to the database. > > The script works fine for 2/3 of the records but eventually FileMaker > (6.0.3 > Developer) crashes. It crashes such that I have to force quit the > application and then recover the database. Unfortunately, I'm left > with no > error messages. > > It seems like the problem is with FileMaker and not my script. I have > been > unable to narrow the problem to a specific record, and the script runs > fine > if I narrow the original search. Is this too much load for FMP? Would > Unlimited do better? Are there other pitfalls I should be > investigating? > > Thank you, > > Dennis Crall > ITS-Academic Technologies > University of Iowa > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From dennis-crall at uiowa.edu Mon Oct 25 14:04:26 2004 From: dennis-crall at uiowa.edu (Dennis Crall) Date: Mon Oct 25 14:04:43 2004 Subject: [FX.php List] Crashing Filemaker In-Reply-To: Message-ID: Dale, Thank you for the suggestion. The script ran perfectly after I updated. I should have thought of that myself. Thanks again, Denny On 10/25/04 2:26 PM, "Dale Bengston" wrote: > Hi Dennis, > > I would strongly suggest updating your copy of FMP to 6.0v4 and then > see if the problems persist. Also, update your Web Companion Extension > to 6.0v3. The updaters (Mac and Windows) may be found at > . > > Hope this helps, > Dale > -- > Dale Bengston | Streamline Studio, LLC | dbengston@streamline-studio.com > Associate Member, FileMaker Solutions Alliance > > On Oct 25, 2004, at 1:11 PM, Dennis Crall wrote: > >> Hello, >> >> I've created a FX.php script that runs from the command line. What it >> does >> is this: >> >> 1. Grabs all records, 215 in all, from the database. The database only >> contains 6 text fields, so there's not a lot of information. >> >> 2. Iterates over all the records. For each record the script: >> >> a. Makes an LDAP query. >> >> b. Updates the record. >> >> c. Writes the record back to the database. >> >> The script works fine for 2/3 of the records but eventually FileMaker >> (6.0.3 >> Developer) crashes. It crashes such that I have to force quit the >> application and then recover the database. Unfortunately, I'm left >> with no >> error messages. >> >> It seems like the problem is with FileMaker and not my script. I have >> been >> unable to narrow the problem to a specific record, and the script runs >> fine >> if I narrow the original search. Is this too much load for FMP? Would >> Unlimited do better? Are there other pitfalls I should be >> investigating? >> >> Thank you, >> >> Dennis Crall >> ITS-Academic Technologies >> University of Iowa >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From lmiranda at gmail.com Wed Oct 27 00:00:49 2004 From: lmiranda at gmail.com (Louie Miranda) Date: Wed Oct 27 00:01:12 2004 Subject: [FX.php List] Can we run scripts on filemaker using FX? In-Reply-To: References: <5016fc5040920230610a8a0b4@mail.gmail.com> <19A509DF-0B9B-11D9-82EF-000A959E46DE@yacobi.com> <5016fc50409210053706fe065@mail.gmail.com> Message-ID: <5016fc5041026230049117012@mail.gmail.com> So guys how do we work on this? i have this but it returns a error response. i have a script TimeStamp, that when access put something on a field. but never worked. //$some_query->AddDBParam("-script", "name_of_the_script"); // connect $query = new FX("192.168.10.11", "8080"); $query -> SetDBData("TempDBF.fp5", "AllFields"); //find $query -> AddDBParam("-script", "TimeStamp"); $query -> AddDBParam('RecordNo', 1); $data1 = $query->FMFind(); foreach ($data1['data'] as $key => $value){ $currentRecord = strtok($key,'.'); } //edit $query -> AddDBParam('-recid', $currentRecord); $query -> AddDBParam('Description', "WALA"); $data2 = $query->FMEdit(); -- Louie Miranda http://www.axishift.com From ggt667 at gmail.com Wed Oct 27 02:47:20 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 27 02:47:43 2004 Subject: [FX.php List] Can we run scripts on filemaker using FX? In-Reply-To: <5016fc5041026230049117012@mail.gmail.com> References: <5016fc5040920230610a8a0b4@mail.gmail.com> <19A509DF-0B9B-11D9-82EF-000A959E46DE@yacobi.com> <5016fc50409210053706fe065@mail.gmail.com> <5016fc5041026230049117012@mail.gmail.com> Message-ID: I only used it with FileMaker 6 unlimited and it worked just fine. Never tried it with FM7SA though.. Gjermund On Wed, 27 Oct 2004 14:00:49 +0800, Louie Miranda wrote: > So guys how do we work on this? i have this but it returns a error response. > i have a script TimeStamp, that when access put something on a field. > > but never worked. > > //$some_query->AddDBParam("-script", "name_of_the_script"); > > // connect > $query = new FX("192.168.10.11", "8080"); > $query -> SetDBData("TempDBF.fp5", "AllFields"); > > //find > $query -> AddDBParam("-script", "TimeStamp"); > $query -> AddDBParam('RecordNo', 1); > $data1 = $query->FMFind(); > > foreach ($data1['data'] as $key => $value){ > $currentRecord = strtok($key,'.'); > } > > //edit > $query -> AddDBParam('-recid', $currentRecord); > $query -> AddDBParam('Description', "WALA"); > $data2 = $query->FMEdit(); > > -- > > > Louie Miranda > http://www.axishift.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From ggt667 at gmail.com Wed Oct 27 02:49:10 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Wed Oct 27 02:49:43 2004 Subject: [FX.php List] Can we run scripts on filemaker using FX? In-Reply-To: <5016fc5041026230049117012@mail.gmail.com> References: <5016fc5040920230610a8a0b4@mail.gmail.com> <19A509DF-0B9B-11D9-82EF-000A959E46DE@yacobi.com> <5016fc50409210053706fe065@mail.gmail.com> <5016fc5041026230049117012@mail.gmail.com> Message-ID: I only used it with FileMaker 6 unlimited and it worked just fine. Never tried it with FM7SA though.. But usually it's more efficient to use php to do that calculation, only reason not to use php to populate the field, is if the script is used by the ordinary FileMaker Pro user as well, then it's smarter to have the script just once in ScriptMaker. Gjermund On Wed, 27 Oct 2004 14:00:49 +0800, Louie Miranda wrote: > So guys how do we work on this? i have this but it returns a error response. > i have a script TimeStamp, that when access put something on a field. > > but never worked. > > //$some_query->AddDBParam("-script", "name_of_the_script"); > > // connect > $query = new FX("192.168.10.11", "8080"); > $query -> SetDBData("TempDBF.fp5", "AllFields"); > > //find > $query -> AddDBParam("-script", "TimeStamp"); > $query -> AddDBParam('RecordNo', 1); > $data1 = $query->FMFind(); > > foreach ($data1['data'] as $key => $value){ > $currentRecord = strtok($key,'.'); > } > > //edit > $query -> AddDBParam('-recid', $currentRecord); > $query -> AddDBParam('Description', "WALA"); > $data2 = $query->FMEdit(); > > -- > > > Louie Miranda > http://www.axishift.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From steve at bluecrocodile.co.nz Wed Oct 27 02:56:43 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Wed Oct 27 02:58:07 2004 Subject: [FX.php List] Can we run scripts on filemaker using FX? In-Reply-To: <5016fc5041026230049117012@mail.gmail.com> Message-ID: <000e01c4bc02$e566c2d0$0c00a8c0@bluecrocodile.co.nz> Hi, I'm not entirely sure I understand what you're trying to do here, but I'll have a lash at helping out... :-) > So guys how do we work on this? i have this but it returns a > error response. i have a script TimeStamp, that when access > put something on a field. > // connect > $query = new FX("192.168.10.11", "8080"); > $query -> SetDBData("TempDBF.fp5", "AllFields"); > > //find > $query -> AddDBParam("-script", "TimeStamp"); > $query -> AddDBParam('RecordNo', 1); > $data1 = $query->FMFind(); > > foreach ($data1['data'] as $key => $value){ > $currentRecord = strtok($key,'.'); > } So the idea here is to find the record in which the user defined field RecordNo = 1, and run the script called TimeStamp...then get the recID for that record...(you do realise that this will always be the same thing don't you...? Because the search for RecordNo = 1 is always going to return the same record...)I presume the important thing here therefore is to run the script and get the -recID > //edit > $query -> AddDBParam('-recid', $currentRecord); > $query -> AddDBParam('Description', "WALA"); > $data2 = $query->FMEdit(); This needs to be a different query, so you need to apply all of the constructors to it, and give it a new name; $query2 = new FX("192.168.10.11", "8080"); $query2 -> SetDBData("TempDBF.fp5", "AllFields"); $query2 -> AddDBParam('-recid', $currentRecord); $query2 -> AddDBParam('Description', "WALA"); $data2 = $query2 ->FMEdit(); Presumably the purpose of query 1 is really to get the -recID so that you can do the edit in the next query...??...but there seems to be little point in doing this unless somewhere else you change the value of 'Description' to some other value as (because you're always going to get the same -recID) once you've set the value once, well, it's set...perhaps if you could explain a little more about what you're trying to do I might be able to be more helpful... Cheers Steve > -- > Louie Miranda > http://www.axishift.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > From chris at iViking.org Wed Oct 27 12:34:21 2004 From: chris at iViking.org (Chris Hansen) Date: Wed Oct 27 12:34:25 2004 Subject: [FX.php List] Can we run scripts on filemaker using FX? In-Reply-To: <5016fc5041026230049117012@mail.gmail.com> References: <5016fc5040920230610a8a0b4@mail.gmail.com> <19A509DF-0B9B-11D9-82EF-000A959E46DE@yacobi.com> <5016fc50409210053706fe065@mail.gmail.com> <5016fc5041026230049117012@mail.gmail.com> Message-ID: Louie, Assuming that you're still having problems, could you be more specific about what error you're seeing? Thanks! --Chris Hansen creator of FX.php "The best way from FileMaker to the Web." www.iViking.org On Oct 27, 2004, at 12:00 AM, Louie Miranda wrote: > So guys how do we work on this? i have this but it returns a error > response. > i have a script TimeStamp, that when access put something on a field. > > but never worked. > > > //$some_query->AddDBParam("-script", "name_of_the_script"); > > // connect > $query = new FX("192.168.10.11", "8080"); > $query -> SetDBData("TempDBF.fp5", "AllFields"); > > //find > $query -> AddDBParam("-script", "TimeStamp"); > $query -> AddDBParam('RecordNo', 1); > $data1 = $query->FMFind(); > > foreach ($data1['data'] as $key => $value){ > $currentRecord = strtok($key,'.'); > } > > //edit > $query -> AddDBParam('-recid', $currentRecord); > $query -> AddDBParam('Description', "WALA"); > $data2 = $query->FMEdit(); > > -- > Louie Miranda > http://www.axishift.com > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From nick at mail.crlibrary.org Wed Oct 27 15:53:38 2004 From: nick at mail.crlibrary.org (Nick Trenary) Date: Wed Oct 27 15:53:11 2004 Subject: [FX.php List] [newbie] passing record from page to page Message-ID: <6.0.0.22.0.20041027164944.01e982f0@mail.crlibrary.org> I have a list of events on page events.php. I would like to have link for each event that will bring up detailed info about the event. We used to use Lasso for this scripting but now we're using PHP. Could someone steer me in the right direction as to how the coding should be written for the events.php page and subsequent details.php page? php.net has been a good resource for me but I am not sure where this falls in the documentation. Thanks, Nick Trenary From jason at stravinsoft.com Wed Oct 27 17:12:06 2004 From: jason at stravinsoft.com (Jason H.Awbrey) Date: Wed Oct 27 17:12:14 2004 Subject: [FX.php List] [newbie] passing record from page to page In-Reply-To: <6.0.0.22.0.20041027164944.01e982f0@mail.crlibrary.org> References: <6.0.0.22.0.20041027164944.01e982f0@mail.crlibrary.org> Message-ID: Hi Nick, Once you have your find request, you will need to do something like this: if ($result['foundCount'] > 0) { foreach ($result['data'] as $key => $value) { $recID = strtok($key, '.'); echo "" . $value['company'] . ""; } Then on the the subsequent page you will just need to incorporate the $_GET['id'] into your find request for the specific record. HTH. Jason H. Awbrey StravinSOFT, Incorporated http://www.stravinsoft.com On Oct 27, 2004, at 4:53 PM, Nick Trenary wrote: > I have a list of events on page events.php. I would like to have link > for each event that will bring up detailed info about the event. We > used to use Lasso for this scripting but now we're using PHP. Could > someone steer me in the right direction as to how the coding should be > written for the events.php page and subsequent details.php page? > php.net has been a good resource for me but I am not sure where this > falls in the documentation. > > Thanks, > Nick Trenary > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2371 bytes Desc: not available Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20041027/42d508b1/smime.bin From ggt667 at gmail.com Thu Oct 28 03:50:53 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Thu Oct 28 03:51:13 2004 Subject: [FX.php List] [newbie] passing record from page to page In-Reply-To: References: <6.0.0.22.0.20041027164944.01e982f0@mail.crlibrary.org> Message-ID: I'd say go read http://www.php.net/array Everything is about arrays in php and c++ also make sure you learn: foreach functions with function names that contain str Gjermund On Wed, 27 Oct 2004 18:12:06 -0500, Jason H. Awbrey wrote: > Hi Nick, > > Once you have your find request, you will need to do something like > this: > > if ($result['foundCount'] > 0) { > foreach ($result['data'] as $key => $value) { > $recID = strtok($key, '.'); > > echo "" . $value['company'] . > ""; > } > > Then on the the subsequent page you will just need to incorporate the > $_GET['id'] into your find request for the specific record. > > HTH. > Jason H. Awbrey > StravinSOFT, Incorporated > http://www.stravinsoft.com > > > > > On Oct 27, 2004, at 4:53 PM, Nick Trenary wrote: > > > I have a list of events on page events.php. I would like to have link > > for each event that will bring up detailed info about the event. We > > used to use Lasso for this scripting but now we're using PHP. Could > > someone steer me in the right direction as to how the coding should be > > written for the events.php page and subsequent details.php page? > > php.net has been a good resource for me but I am not sure where this > > falls in the documentation. > > > > Thanks, > > Nick Trenary > > > > _______________________________________________ > > FX.php_List mailing list > > FX.php_List@mail.iviking.org > > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > From hawksworth-2 at medctr.osu.edu Thu Oct 28 12:35:21 2004 From: hawksworth-2 at medctr.osu.edu (Kim Hawksworth) Date: Thu Oct 28 12:37:51 2004 Subject: [FX.php List] LinkNext/LinkPrevious and FMFind Message-ID: I sent a message to the list back on the 19th of this month regarding a problem with LinkNext/LinkPrevious from the FMFind() function. It didn't get any responses, so I thought I'd try again... As previously stated, I can get linkNext and LinkPrevious to work just fine from the FMFindAll(); function, but from an FMFind(); function the initial set of records returned has one more record than what was specified by the skip number (in others words if the skip # is set to 25, it returns 26 records). Clicking the LinkNext button finds no more matching records in the database instead of the next set of 25. LinkPrevious also gives the same message instead of displaying the previous 25 records. I intiallize the skip number with the following code: if (isset($_GET['skip'])) { $currentSkip = $_GET['skip']; } else { $currentSkip = 0; } $resident_search->FMSkipRecords($currentSkip); The linkNext button uses the following code: Next Results Like I said, this works fine with FMFindAll. Is there something else I need to do to get this to work with the FMFind(); function? Thanks for your help. --Kim Kim David Hawksworth, R.Ph., Web Manager The Ohio State University Medical Center Department of Pharmacy From dbengston at preservationstudio.com Thu Oct 28 15:33:02 2004 From: dbengston at preservationstudio.com (Dale Bengston) Date: Thu Oct 28 15:33:10 2004 Subject: [FX.php List] LinkNext/LinkPrevious and FMFind In-Reply-To: References: Message-ID: Hi Kim, What value is entered for the third argument in SetDBData? (The third argument is the number of records to display.) $fx_query->SetDBData ('mydb', 'web', '->what_is_here<-'); Dale Dale Bengston | Streamline Studio, LLC | dbengston@streamline-studio.com Associate Member, FileMaker Solutions Alliance On Oct 28, 2004, at 1:35 PM, Kim Hawksworth wrote: > I sent a message to the list back on the 19th of this month regarding a > problem with LinkNext/LinkPrevious from the FMFind() function. It > didn't get any responses, so I thought I'd try again... > > As previously stated, I can get linkNext and LinkPrevious to work just > fine from the FMFindAll(); function, but from an FMFind(); function > the > initial set of records returned has one more record than what was > specified by the skip number (in others words if the skip # is set to > 25, it returns 26 records). Clicking the LinkNext button finds no more > matching records in the database instead of the next set of 25. > LinkPrevious also gives the same message instead of displaying the > previous 25 records. I intiallize the skip number with the following > code: > > if (isset($_GET['skip'])) { > $currentSkip = $_GET['skip']; > } else { > $currentSkip = 0; > } > > $resident_search->FMSkipRecords($currentSkip); > > The linkNext button uses the following code: > > if (strlen($search_results['linkNext']) <1) { > echo ""; > > }else{ > > ?> > > Next > Results align="middle"> > > } > ?> > > Like I said, this works fine with FMFindAll. Is there something else I > need to do to get this to work with the FMFind(); function? > > Thanks for your help. > > --Kim > > > > > > Kim David Hawksworth, R.Ph., Web Manager > The Ohio State University Medical Center > Department of Pharmacy > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > From dennis-crall at uiowa.edu Thu Oct 28 15:42:16 2004 From: dennis-crall at uiowa.edu (Dennis Crall) Date: Thu Oct 28 15:42:25 2004 Subject: [FX.php List] Spawning a related record with FMNew Message-ID: Hello, I have two FMP6 files with a simple relationship on a text key. The relationship is a 1->Many (1 Contact to many Interactions), and I'm working on the many side. We have a FM interface where the user can enter the date, the key, and a description of the interaction. If the key is not present in the Contact db then a new Contact record is spawned. I want to do something similar with the web interface. For an FX query, can I populate a related field like Contact::key to spawn a new record? Or do I need to form a separate query and make a new request on the other table manually? Thanks in advance, Dennis Crall ITS-Academic Technologies University of Iowa. From jason at stravinsoft.com Thu Oct 28 16:11:13 2004 From: jason at stravinsoft.com (Jason H.Awbrey) Date: Thu Oct 28 16:11:28 2004 Subject: [FX.php List] Spawning a related record with FMNew In-Reply-To: References: Message-ID: <4996C095-292E-11D9-B818-000A9592DE20@stravinsoft.com> Dennis, So long as you have a crate relationship setup between the two files, you can create a related record by simply setting the related field in the FX query (and the related field is on the layout you are referencing, of course!). Cheers, Jason H. Awbrey StravinSOFT, Incorporated http://www.stravinsoft.com On Oct 28, 2004, at 4:42 PM, Dennis Crall wrote: > Hello, > > I have two FMP6 files with a simple relationship on a text key. The > relationship is a 1->Many (1 Contact to many Interactions), and I'm > working > on the many side. We have a FM interface where the user can enter the > date, > the key, and a description of the interaction. If the key is not > present in > the Contact db then a new Contact record is spawned. I want to do > something > similar with the web interface. > > For an FX query, can I populate a related field like Contact::key to > spawn a > new record? Or do I need to form a separate query and make a new > request on > the other table manually? > > Thanks in advance, > > Dennis Crall > ITS-Academic Technologies > University of Iowa. > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2371 bytes Desc: not available Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20041028/b236c388/smime.bin From steve at bluecrocodile.co.nz Thu Oct 28 17:41:18 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Thu Oct 28 17:42:04 2004 Subject: FW: [FX.php List] Spawning a related record with FMNew In-Reply-To: <7F1A1728449660458E709E3AF86447F9851A66@scurrex3.curriculum.edu.au> References: <7F1A1728449660458E709E3AF86447F9851A66@scurrex3.curriculum.edu.au> Message-ID: Dennis, If you're creating records on the 'many' side, then my initial thought is you're going to need to run a three step process...if you put $query -> ('Contact::key' = $_POST['contact']); in your primary 'many' database creation then I suspect you'll get an error as there will be no relationship at the time at which the record in the 'many' db is created.. How I'd be inclined to tackle this would be; step one, create the 'many' db record, setting the field in that db which is used by the relationship step two, search the 'one' database to see if that key exists step three, if not, create that record You can do this by putting three FX.php queries into your php page... In fact it may be possible to avoid 'step two' as you could check in the returned data from step one, to see if a field from the 'one' database has data, if it does, then you know that the contact is there, if not, create it with a second FX.php query to the 'one' database... Not sure that this is the _best_ way to do this, but I think it would work...hope it makes sense... Cheers Steve > Hello, > > I have two FMP6 files with a simple relationship on a text key. > The relationship is a 1->Many (1 Contact to many Interactions), and > I'm working on the many side. We have a FM interface where the user can > enter the date, the key, and a description of the interaction. If the > key is not present in the Contact db then a new Contact record is > spawned. I want to do something similar with the web interface. > > For an FX query, can I populate a related field like > Contact::key to spawn a new record? Or do I need to form a separate > query and make a new request on the other table manually? > > Thanks in advance, > > Dennis Crall > ITS-Academic Technologies > University of Iowa. > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > From hawksworth-2 at medctr.osu.edu Thu Oct 28 21:37:52 2004 From: hawksworth-2 at medctr.osu.edu (Kim Hawksworth) Date: Thu Oct 28 21:38:11 2004 Subject: [FX.php List] LinkNext/LinkPrevious and FMFind Message-ID: Hi Dale, The third argument number is 25. I'm trying to display the found set in groups of 25. >>>dbengston@preservationstudio.com 10/28/04 5:33 pm >>> Hi Kim, What value is entered for the third argument in SetDBData? (The third argument is the number of records to display.) $fx_query->SetDBData ('mydb', 'web', '->what_is_here<-'); Dale Dale Bengston | Streamline Studio, LLC | dbengston@streamline-studio.com Associate Member, FileMaker Solutions Alliance On Oct 28, 2004, at 1:35 PM, Kim Hawksworth wrote: >I sent a message to the list back on the 19th of this month regarding a >problem with LinkNext/LinkPrevious from the FMFind() function. It >didn't get any responses, so I thought I'd try again... > >As previously stated, I can get linkNext and LinkPrevious to work just >fine from the FMFindAll(); function, but from an FMFind(); function >the >initial set of records returned has one more record than what was >specified by the skip number (in others words if the skip # is set to >25, it returns 26 records). Clicking the LinkNext button finds no more >matching records in the database instead of the next set of 25. >LinkPrevious also gives the same message instead of displaying the >previous 25 records. I intiallize the skip number with the following >code: > >if (isset($_GET['skip'])) { > $currentSkip = $_GET['skip']; >} else { > $currentSkip = 0; >} > >$resident_search->FMSkipRecords($currentSkip); > >The linkNext button uses the following code: > >if (strlen($search_results['linkNext']) <1) { >echo ""; > >}else{ > >?> > >Next >Results align="middle"> > >} >?> > >Like I said, this works fine with FMFindAll. Is there something else I >need to do to get this to work with the FMFind(); function? > >Thanks for your help. > >--Kim > > > > > >Kim David Hawksworth, R.Ph., Web Manager >The Ohio State University Medical Center >Department of Pharmacy > >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list > FX.php_List mailing list FX.php_List@mail.iviking.org http://www.iviking.org/mailman/listinfo/fx.php_list From milos at mcservices.com Fri Oct 29 08:12:57 2004 From: milos at mcservices.com (Milos Vukotic) Date: Fri Oct 29 08:13:14 2004 Subject: [FX.php List] LinkNext/LinkPrevious and FMFind In-Reply-To: References: Message-ID: <41824FE9.9020808@mcservices.com> If you are looking for bugs (either from You, ether from FX.php, either from FM server), first you should add as a first line of your script before any include or require_once (after Hi Dale, The third argument number is 25. I'm trying to display the >found set in groups of 25. > > > > >>>>dbengston@preservationstudio.com 10/28/04 5:33 pm >>> >>>> >>>> >Hi Kim, > >What value is entered for the third argument in SetDBData? (The third >argument is the number of records to display.) > >$fx_query->SetDBData ('mydb', 'web', '->what_is_here<-'); > >Dale > >Dale Bengston | Streamline Studio, LLC | dbengston@streamline-studio.com > >Associate Member, FileMaker Solutions Alliance > >On Oct 28, 2004, at 1:35 PM, Kim Hawksworth wrote: > > > >>I sent a message to the list back on the 19th of this month regarding a >> >> > > > >>problem with LinkNext/LinkPrevious from the FMFind() function. It >>didn't get any responses, so I thought I'd try again... >> >>As previously stated, I can get linkNext and LinkPrevious to work just >>fine from the FMFindAll(); function, but from an FMFind(); function >>the >>initial set of records returned has one more record than what was >>specified by the skip number (in others words if the skip # is set to >>25, it returns 26 records). Clicking the LinkNext button finds no more >> >> > > > >>matching records in the database instead of the next set of 25. >>LinkPrevious also gives the same message instead of displaying the >>previous 25 records. I intiallize the skip number with the following >>code: >> >>if (isset($_GET['skip'])) { >> $currentSkip = $_GET['skip']; >>} else { >> $currentSkip = 0; >>} >> >>$resident_search->FMSkipRecords($currentSkip); >> >>The linkNext button uses the following code: >> >>>if (strlen($search_results['linkNext']) <1) { >>echo ""; >> >>}else{ >> >>?> >> >>Next >>Results >align="middle"> >> >>>} >>?> >> >>Like I said, this works fine with FMFindAll. Is there something else I >> >> > > > >>need to do to get this to work with the FMFind(); function? >> >>Thanks for your help. >> >>--Kim >> >> >> >> >> >>Kim David Hawksworth, R.Ph., Web Manager >>The Ohio State University Medical Center >>Department of Pharmacy >> >>FX.php_List mailing list >>FX.php_List@mail.iviking.org >>http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> > > >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list >_______________________________________________ >FX.php_List mailing list >FX.php_List@mail.iviking.org >http://www.iviking.org/mailman/listinfo/fx.php_list > > > From nick at mail.crlibrary.org Fri Oct 29 09:25:15 2004 From: nick at mail.crlibrary.org (Nick Trenary) Date: Fri Oct 29 09:24:46 2004 Subject: [FX.php List] php, filemaker and html forms Message-ID: <6.0.0.22.0.20041029095540.01e16bf8@mail.crlibrary.org> I have a php page in which I want to pass a field value from one database to another in a form. Does the form have input name values just like using CDML or are there other values to use? Here's the form I've tried: [Code] .... [php code]... ?>
// Is the extension needed? '); ?> [/Code] Are these the correct input names to use? In this case is the form action page the same page as the -format page? Thanks in advance, Nick ---- Nick Trenary Computer Information Systems Analyst Cedar Rapids Public Library Office:(319) 398-5145 x267 Work cell: (319) 310-7699 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041029/febc5c0e/attachment-0001.html From ggt667 at gmail.com Fri Oct 29 13:34:21 2004 From: ggt667 at gmail.com (Gjermund Gusland Thorsen) Date: Fri Oct 29 13:34:57 2004 Subject: [FX.php List] php, filemaker and html forms In-Reply-To: <6.0.0.22.0.20041029095540.01e16bf8@mail.crlibrary.org> References: <6.0.0.22.0.20041029095540.01e16bf8@mail.crlibrary.org> Message-ID: Using php you have to write the parser side too, not just the submitting context. That is the info you have in hidden could stay there, but most likely you will rather hardcode that info into confirm.php Gjermund Gusland Thorsen On Fri, 29 Oct 2004 10:25:15 -0500, Nick Trenary wrote: > I have a php page in which I want to pass a field value from one database > to another in a form. Does the form have input name values just like using > CDML or are there other values to use? Here's the form I've tried: > > [Code] > .... [php code]... > ?> > > > // Is the extension > needed? > > > > > > > echo('input type=hidden name=ClassID value=' . $value['ClassID'][0] . '>'); > ?> > > [/Code] > > Are these the correct input names to use? In this case is the form action > page the same page as the -format page? > > Thanks in advance, > Nick > > > ---- > Nick Trenary > Computer Information Systems Analyst > Cedar Rapids Public Library > Office:(319) 398-5145 x267 > Work cell: (319) 310-7699 > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > From Micah.Desjardins at asu.edu Fri Oct 29 14:41:49 2004 From: Micah.Desjardins at asu.edu (Micah Desjardins) Date: Fri Oct 29 14:45:08 2004 Subject: [FX.php List] 7 Server Advanced Message-ID: I'm having a little bit of difficulty with using the FX class with 7 Server Advanced. Here's what I can tell you, all of the relevant software is installed on the same machine: Mac OS X 10.3 Server 7 Advanced Web Publishing Engine Apache 1.3.29 (Darwin) PHP Version 5.0.1 (www.entropy.ch Release 1) All the files from the FX package are inside a folder called FX which is just inside the WebServer/Documents root folder. If I use a URL to make a call to the XML engine in filemaker, such as http://my.server.edu/fmi/xml/FMPXMLRESULT.xml?-db=Datawarehouseexport.fp7&-lay=newmdjtestfunk&-findall It returns the data set without a problem, no prompting for passwords or authenticatino (Guest access is turned on for the database) If I use the following PHP page I get this error message: Fatal error: Cannot use object of type FX_Error as array in WebServer/Documents/test.php on line 24 I realize there must be a problem with my code, but I'm really not sure what I'm doing that is causing said problem. It looks like it pulls the Query, but then when I try to look at the Query, I get the type errors. Any assistance would be appreciated! Micah DesJardins -----My Code---- Untitled setDBData('Datawarehouseexport.fp7','newmdjtestfunk'); $TestResult = $TestInstance->FMFindall(); ?> Found Count:
Error Code:
----End Code From steve at bluecrocodile.co.nz Fri Oct 29 18:10:43 2004 From: steve at bluecrocodile.co.nz (Steve Winter) Date: Fri Oct 29 18:11:18 2004 Subject: [FX.php List] php, filemaker and html forms In-Reply-To: <6.0.0.22.0.20041029095540.01e16bf8@mail.crlibrary.org> Message-ID: <007401c4be14$e8c98200$0c00a8c0@bluecrocodile.co.nz> Nick, I'll try and help you out, but it's tricky to gauge from what you've put below how much you already have working... ;-) [Code] .... [php code]... //Does this php code include a call to a database in which you get the value from the first database which you want to 'pass on'...??? something like; include_once("/FX.php"); include_once("serverVariables.php"); $classQuery = new FX($serverIP, $serverPort); $classQuery->SetDBData("firstDatabase.fp5", "web"); $classQuery->AddDBParam(....Whatever the search criteria are...); $classData = $classQuery->FMFind(); $classKey = key($classData['data']; ?> // Is the extension needed? //Not required put this in confirm.php //Not required forms part of your initiation of db in confirm.php //Not required at all, the 'action' in the form tag above has specified this already '); //this is the right idea, but not quite right... //presuming as I am that in the php code block above you've got the vale from the first database, and the key value of the data //then here you would; echo ""; ?> [/Code] Then on confirm.php you'd have (something like); SetDBData("dbname.fp5", "web"); $newQuery->AddDBParam('First_name', $_REQUEST['First_name']); $newQuery->AddDBParam('Last_name', $_REQUEST['Last_name']); $newQuery->AddDBParam('Phone_number', $_REQUEST['Phone_number']); $newQuery->AddDBParam('ClassID', $_REQUEST['ClassID']); $newData = $newQuery->FMNew(); $newKey = key($contentData['data']); ?>

Dear ,

Thanks for filling in the details on our website they have been save for future reference.

CheersMe

Hope this helps and makes sense...let me know if you need further assistance... Cheers Steve Are these the correct input names to use? In this case is the form action page the same page as the -format page? Thanks in advance, Nick ---- Nick Trenary Computer Information Systems Analyst Cedar Rapids Public Library Office:(319) 398-5145 x267 Work cell: (319) 310-7699 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041030/a636b0e9/attachment.html