munnaz Posted September 19, 2010 Share Posted September 19, 2010 Hey guys was wondering if anyone could modify the code below to have $output = 'yes' if the number of rows equal 10, 20, 30, 40, 50, 60, 70, 80......... etc $dbhost = '******'; $dbuser = ''******';'; $dbpass = ''******';'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('MYSQL N/A - Please Contact Admin'); $dbname = ''******';'; mysql_select_db($dbname); $query="SELECT * FROM documentaryinfo"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close($conn); ?> Thanks -------------------------------------------------------------------------------------------------------- Watch Free Documentaries Online - The Documentary Database www.free-documentaries-online.com -------------------------------------------------------------------------------------------------------- Quote Link to comment Share on other sites More sharing options...
PaulRyan Posted September 19, 2010 Share Posted September 19, 2010 Try the following... <? $dbhost = '******'; $dbuser = ''******';'; $dbpass = ''******';'; $dbname = ''******';'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('MYSQL N/A - Please Contact Admin'); mysql_select_db($dbname); $query = "SELECT * FROM documentaryinfo"; $result = mysql_query($query); $num = mysql_numrows($result); if(is_int($num/10)){ $output = 'yes'; } mysql_close($conn); ?> Tell me how is goes bud. Regards, Paul. Quote Link to comment Share on other sites More sharing options...
munnaz Posted September 20, 2010 Author Share Posted September 20, 2010 Thanks works perfect Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.