Welcome Guest, Not a member yet? Register   Sign In
Best way to prepare SQL statements?
#6

[eluser]Sumon[/eluser]
This reduce only else(if...else) block. i.e parenthesis. However, it doesn't display error for empty recordset. Anyway, thanks.
Finally one more way of view:
Code:
if(count($Recordsets->result())==0)    echo "Sorry no member exists.";
<?php foreach($SiteFeatureInfo->result() as $row): ?>
    <?=$row->site_feature_name;?>
<?php endforeach; ?>


Messages In This Thread
Best way to prepare SQL statements? - by El Forum - 11-09-2007, 09:14 AM
Best way to prepare SQL statements? - by El Forum - 11-09-2007, 09:31 AM
Best way to prepare SQL statements? - by El Forum - 11-09-2007, 01:03 PM
Best way to prepare SQL statements? - by El Forum - 08-12-2008, 10:42 PM
Best way to prepare SQL statements? - by El Forum - 08-13-2008, 01:24 AM
Best way to prepare SQL statements? - by El Forum - 08-14-2008, 03:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB