WhiteCube Posted December 20, 2007 Share Posted December 20, 2007 hi, I have a table with the type "int"... Its for an inventory script.. so.. Is there a special "table type" that i can use so if the amount of a certain item is zero or smaller.. is is automatically stripped from the table? thanks! Link to comment https://forums.phpfreaks.com/topic/82595-table-types/ Share on other sites More sharing options...
teng84 Posted December 20, 2007 Share Posted December 20, 2007 you dont have to do it that all you need is a select statement that will display all the record with 0 inventory not delete it automatically.. but you can Link to comment https://forums.phpfreaks.com/topic/82595-table-types/#findComment-419924 Share on other sites More sharing options...
WhiteCube Posted December 20, 2007 Author Share Posted December 20, 2007 oh .. so there isn't anything already in MySQL (like the autoincrement) which deletes all records with "0"? Link to comment https://forums.phpfreaks.com/topic/82595-table-types/#findComment-419926 Share on other sites More sharing options...
teng84 Posted December 20, 2007 Share Posted December 20, 2007 i believe yes..but you can delete all the zero item using delete query eg.. delete from table where id=0 Link to comment https://forums.phpfreaks.com/topic/82595-table-types/#findComment-419942 Share on other sites More sharing options...
WhiteCube Posted December 20, 2007 Author Share Posted December 20, 2007 oh ok.. BUT.. I'll have to do it manually right? Unless i have cronjobs right? lol Thanks for your info! Link to comment https://forums.phpfreaks.com/topic/82595-table-types/#findComment-419953 Share on other sites More sharing options...
teng84 Posted December 20, 2007 Share Posted December 20, 2007 yep! or just add it into your script so everytime you run your script it will return the zero id then delete Link to comment https://forums.phpfreaks.com/topic/82595-table-types/#findComment-419959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.