[FX.php List] Different results on 2 installations of same DB and sctipt

Vision Computer Consulting info at visioncomputerconsulting.com
Sat Apr 28 16:35:38 MDT 2007


I have alot of PHP experience, but not that much with FM. Is it  
possible to have a corrupted layout. I ask because I can do a find on  
other layouts . I put the find on the shopping layout in the body of  
the script and get not result. Put a different find in the same place  
in the code and get a 'foundCount'/


On Apr 28, 2007, at 3:07 PM, Jonathan Schwartz wrote:

> This error, from my experience, occurs when fx expects to get an  
> array of returned  data after a query, but instead gets  
> none...which it calls a scalar.  (my interpretation).
>
> So, if I'm correct, then this isn't the problem.  It's a result of  
> the problem.
>
> Did you turn on Debug to examine the queries that FX is sending  
> FMP?  It's tell the story.
>
> J
>
>
> At 2:54 PM -0700 4/28/07, Vision Computer Consulting wrote:
>> I got about this error, but thought I should investigate why it is  
>> happening first.
>>
>> Warning: Cannot use a scalar value as an array in /Users/spcalia/ 
>> Sites/ram/fx/theprogRAM/php/lib/cust_cart_class.php on line 1024
>>
>> Cose is:
>>
>> //define db and layout to be used
>>                 $layout="shopping";
>>                 $my_fx->SetDBData($db,$layout);
>>                 $my_fx->AddDBParam('warranty_type',$cat);
>>                 $my_fx->AddDBParam('session',$this->cart_id);
>>                 $fx_Result=$my_fx->FMFind();
>>
>>         $count = $fx_Result['foundCount']; //leave in for $contents 
>> ['items'] = $count;
>>         //echo $cat. $count;
>>
>>         $i = 0;
>>         foreach($fx_Result['data'] as $key=>$value) { //line 1024
>>                 $contents[$i] = array(
>>                         'warrantyID'=> $value['warrantyID'][0],
>>                         'name'=> $value['warranties_new::name'][0],
>>                         'name_sub'=> $value 
>> ['warranties_new::name_sub'][0],
>>                         'price'=> $value['warranties_new::price'][0],
>>                         'quantity'=> $value['quantity'][0],
>>                         'online_discount'=> $value 
>> ['warranties_new::online_discount'][0]
>>                 );
>>
>>                 $i++;
>>                 }
>>
>>
>> As far as I can tell, the error is telling me $fx_Result is a  
>> scalar instead of an array.
>>
>> As I said, exact same code works in another installation.
>>
>> Thanks in advance for your help.
>>
>> Stephen
>>
>>
>> On Apr 28, 2007, at 12:47 PM, Bob Patin wrote:
>>
>>> Well, that tells you that the connection is being made.
>>>
>>> I would probably try trimming my query; comment out all but one  
>>> parameter to see if you can get some results. If that doesn't  
>>> work, try duplicating the same search in the db itself (you may  
>>> have already tried this).
>>>
>>>
>>> On Apr 28, 2007, at 2:23 PM, Vision Computer Consulting wrote:
>>>
>>>> Error code come back the first time as 401 (to be expected), but  
>>>> then the error code doesn't show up on subsequent finds on the  
>>>> cart.
>>>>
>>>> On Apr 28, 2007, at 12:19 PM, Bob Patin wrote:
>>>>
>>>>> So other finds work on the web?
>>>>>
>>>>> Did you try returning the error code? $findResult['errorCode']
>>>>>
>>>>>
>>>>> On Apr 28, 2007, at 2:14 PM, Vision Computer Consulting wrote:
>>>>>
>>>>>> I am getting data on some cases. I am populating page content  
>>>>>> from the db and that works. What is not working is finding  
>>>>>> recording in my shopping cart records. I can search the db  
>>>>>> manually and find the record I am looking for, but not through  
>>>>>> FX. That is the only part that doesn't work. Other Finds work.
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-381-1852
> FileMaker 8 Certified Developer
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070428/3162c267/attachment.html


More information about the FX.php_List mailing list