[FX.php List] modid, recid, and single record search results

DC dan.cynosure at dbmscan.com
Wed Dec 12 12:00:41 MST 2007


great question! one for the FAQ.

$rec = current($ReturnedData['data']);

dan

Jamie Adams had written:
> Hello all,
> 
>  
> 
> I have a script that pulls data on individual records.  It does a search 
> for the records primary key value in the primary key field.  And with 
> any luck, finds one and only one record.  So my FMFind() returns an 
> array with all the usual stuff, and my single, solitary record, to my 
> $ReturnedData array.  So I should be able to get my data in 
> ReturnedData[‘data’], but I have to specify and record ID and a mod ID.  
> I assume since there’s only one record in my found set, my RecID is 
> either 0 or 1.  But what’s my ModID?  I’m not making any changes, so I 
> just want the most current version.
> 
>  
> 
> When I have multiple records returned, I do a 
> foreach($ReturnedData[‘data’] as $key=>$searchData), and then use 
> $searchData as my array of search results.  That works, but I never 
> really understood why.  And it seems wasteful and inefficient to use the 
> foreach() when I only have 1 record.  Is there another way?
> 
>  
> 
> Jamie Adams
> 
> ________________________________________________________
> 
>  
> 
> Liquis, Inc.
> 
>  
> 
> 400 Parker Drive, Suite 1110, Austin, TX 78728
> 
> phone 512.299.9634, ext 103 -- fax 512.873.0575
> 
> ________________________________________________________
> 
>  
> 
> www.liquis.com <http://www.liquis.com>
> 
> www.auctionpartner.com <http://www.auctionpartner.com>
> 
> www.furniture-partner.com <http://www.furniture-partner.com>
> 
> eBay Store: 
> http://stores.ebay.com/Auction-Partner-High-Tech-Equipment?refid=store
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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