[FX.php List] AddSortParam line shows 0 records

Chris Hansen chris at iViking.org
Fri Jan 13 10:12:17 MST 2012


Hi all,

Let me weigh in on a few things here:

1) Sort order is an optional parameter -- the presence or absence thereof should make no difference.

2) Bob, he's using username and password in the right order for that call; SetDBPassword(), a carryover from the no username days of FM6 and earlier, uses the order you specify.

3) The malformed URL makes me wonder if there's a problem with FX.php (eek!), or perhaps a missing quote or something similar (and tiny) somewhere (this would go along with your fresh page working...)  Does your text editor have syntax coloring?

4) Spaces in field names, layout names, relationship names, etc. used on the web can be tricksy and cause unexpected results; any way you can rename that relationship to use camelCase, etc.?

Hopefully those help a bit.  If not, perhaps you could send me your file back-channel and I'll have a look.

Best,

--Chris Hansen
  FileMaker 7/8/9 Certified Developer
  Creator of FX.php
  "The best way from FileMaker to the Web."
  www.iViking.org

On Jan 13, 2012, at 9:03 AM, Bob Patin wrote:

> Denis,
> 
> Here's what you had in your original post:
> 
> Here's the code for arg's sake:
> $q->SetDBUserPass( $webUN, $webPW );
> $q->SetDBData( $webDB, 'Quotes_Lines_layout' );
> $q->AddSortParam('quote_id');         //<<<<<<<<<<<<<<<<<<<<< THIS IS THE LINE THAT BORKS EVERYTHING
> $q->AddDBParam( 'Quotes_lines to quotes::user_id', $_SESSION[$pKey]['id'] );
> $q->AddDBParam( 'quote_id', $_GET["id"] );
> $r = $q->FMFind();
> 
> I see 2 things wrong with this code:
> 
> $q->SetDBUserPass( $webUN, $webPW );
> 
> That's backwards; specify the password first, like this:
> 
> $q->SetDBUserPass( $webPW , $webUN );
> ----------------
> 
> Second, you didn't specify what your sortParam is and this is what is probably breaking things as well; try this
> 
> $q->AddSortParam('quote_id' , 'ascend' );
> 
> 
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> AIM: longterm1954
> iChat: bobpatin
> --
> Expert FileMaker Consulting 
> FileMaker Hosting for all versions of FileMaker
> 
> 
> On Jan 12, 2012, at 11:38 PM, Denis Somar wrote:
> 
>> To further the mystery, I tried sorting on another page that works perfectly and it also borks with error 5 but no malformed URL
>> 
>> I tried reinstalling FX.php in case I had done something with it and still no luck.
>> 
>> I'm now officially at a complete loss, oy...
>> 
>> D
>> 
>> On Thu, Jan 12, 2012 at 4:29 PM, Troy Meyers <tcmeyers at troymeyers.com> wrote:
>> Denis,
>> 
>> Has anyone suggested, or have you tried, just renaming the FileMaker field quote_id to something different, such as qote_id (and of course changing the instances in PHP) to see if that magically cures the problem?
>> 
>> -Troy
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list





More information about the FX.php_List mailing list