[FX.php List] Different results on 2 installations of same DB and
sctipt
Vision Computer Consulting
info at visioncomputerconsulting.com
Sat Apr 28 15:54:56 MDT 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070428/06773a38/attachment-0001.html
More information about the FX.php_List
mailing list