[FX.php List] portal rows cont'd
Erik Andreas Cayré
erik at cayre.dk
Sun Oct 29 01:47:13 MST 2006
Den 26/10/2006 kl. 16.26 skrev David Tinoco:
> There was an error in my last code. Here is what it should have been:
>
> if(isset($_REQUEST['item'])){
> $item = '=='.$_REQUEST['item'];
> $detail=new FX($serverIP,$webCompanionPort);
> $detail->SetDBData('XXXXX.fp7','Web View Catalogue');
> $detail->SetDBPassword($webPW,$webUN);
> $detail->AddDBParam('UPC Code',$item);
> $detailResult=$detail->FMFind();
Now you've found the records matching '$item'
What do you expect from the following piece of code?
The foreach won't work: replace the ';' with a '{'
$detailResult['foundCount'] tells you how many records you found.
There is no point in putting it inside a foreach.
> foreach($detailResult['data']as $key=>$detailData);
> $searchcount = $detailResult['foundCount'];
> if($searchcount > 0)
> {
> $related=new FX($serverIP,$webCompanionPort);
> $related->SetDBData('XXXXX.fp7','Web View Catalogue');
> $related->SetDBPassword($webPW,$webUN);
> $related->AddDBParam('UPC Code',$item);
> $related->AddDBParam('Keyword Match::MatchKeywords',$detailData
> ['MatchKeywords'][0]);
> $relatedResult=$related->FMFind();
> $relatedCount = $relatedResult['foundCount'];
> }
> }
---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø
Home Tel: +45 75150512
Mobile: +45 40161183
»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein
»If you don't have time to do it right, when will you have time to do
it over?«
-- John Wooden, basketball coach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1856 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20061029/d7d5138f/smime.bin
More information about the FX.php_List
mailing list