[FX.php List] FoundCount FMAS 7 vs FM 6

Kim Hawksworth Kim.Hawksworth at osumc.edu
Tue Nov 15 15:59:07 MST 2005


I¹m in the process of converting my FX.php applications from FM 6 to FMAS 7.
I typically use the following code at the start of my  search results pages:


<?php

If ($search_results[ŒfoundCount¹] == 0) {

echo ³No Results Found!²;

}else{

Display table of results;

}

?>

In FMSA 7 this returns an empty table of results instead of the ³No Results
Found!² statement.  If I put an echo $search_results[ŒfoundCount¹];
statement on the page, FMSA 7 returns a  -1 instead of 0 when it finds no
records matching the search criteria.  Is there a way to force FMSA 7 to
return 0 instead of -1?

I suppose I could change the criteria of the if statement to  <= 0, however,
this just doesn¹t seem right.  Has anyone else come across this difference
in the [ŒfoundCounts¹] function between the two versions and what have you
done as a workaround?


-- 
Kim D. Hawksworth, R.Ph., Web Manager
Department of Pharmacy
The Ohio State University Health System

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20051115/39cf4525/attachment.html


More information about the FX.php_List mailing list