burnside Posted January 10, 2008 Share Posted January 10, 2008 Hey all. i have this query : $get_edit = mysql_query(sprintf("SELECT * FROM `news` ORDER BY id DESC LIMIT 0, 10 ")) or die('Error: ' . mysql_error()); while($edit = mysql_fetch_array($get_edit)) { $edit[msg] = str_replace($words, $faces, $edit['msg']); echo " <br /><br />$space <form action=\"test.php\" method=\"post\"><input type=\"checkbox\" name=\"id\" value=\"".$edit['id']."\"> ".$edit['id']." "; it works fine i was woundering is there a way if there no records for it to display none or some thing ? Quote Link to comment Share on other sites More sharing options...
trq Posted January 10, 2008 Share Posted January 10, 2008 Take a look at mysql_num_rows(). Quote Link to comment Share on other sites More sharing options...
burnside Posted January 10, 2008 Author Share Posted January 10, 2008 thank you. And sorry posted in wrong bored. 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.