Jfisher446 Posted November 10, 2006 Share Posted November 10, 2006 I just dont know how to put this into code. I want to do:$dupetablequery = "SELECT * FROM UsedInvTypes WHERE typeID = $typeID";$duperesult = mysql_query($dupetablequery);"if no records found..."What is the statement for that? How does the result return if nothing was found???Thanks Quote Link to comment https://forums.phpfreaks.com/topic/26814-resolved-how-to-do-if-not-in-table/ Share on other sites More sharing options...
redbullmarky Posted November 10, 2006 Share Posted November 10, 2006 checking [url=http://uk2.php.net/manual/en/function.mysql-num-rows.php]mysql_num_rows[/url] will tell you how many results are found[code]<?phpif (mysql_num_rows($duperesult) == 0){ // no results}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/26814-resolved-how-to-do-if-not-in-table/#findComment-122623 Share on other sites More sharing options...
Jfisher446 Posted November 10, 2006 Author Share Posted November 10, 2006 Wonderful...thanks! Quote Link to comment https://forums.phpfreaks.com/topic/26814-resolved-how-to-do-if-not-in-table/#findComment-122624 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.