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 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] 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! 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
Archived
This topic is now archived and is closed to further replies.