davids701124 Posted October 14, 2009 Share Posted October 14, 2009 I have 2 tables in my data, which are "post" and "event" I won't make a summary page for showing the condition of these two tables. so what I am thinking is SELECT the fields inside the table and if there is content, return true or it will return false. but i don't know which php methoad can check the content and return booleans value. any comment? Link to comment https://forums.phpfreaks.com/topic/177640-asking-for-direction/ Share on other sites More sharing options...
JAY6390 Posted October 14, 2009 Share Posted October 14, 2009 Are you wanting to check if the tables exist or if they contain data only? Link to comment https://forums.phpfreaks.com/topic/177640-asking-for-direction/#findComment-936665 Share on other sites More sharing options...
davids701124 Posted October 14, 2009 Author Share Posted October 14, 2009 i wanna check the contained data only. Link to comment https://forums.phpfreaks.com/topic/177640-asking-for-direction/#findComment-936675 Share on other sites More sharing options...
JAY6390 Posted October 14, 2009 Share Posted October 14, 2009 just run a query like "SELECT * FROM `table_name`" then use mysql_num_rows function to see how many results there are. If there are 0 then it's empty Link to comment https://forums.phpfreaks.com/topic/177640-asking-for-direction/#findComment-936678 Share on other sites More sharing options...
davids701124 Posted October 14, 2009 Author Share Posted October 14, 2009 i know, but this way just get the whole result, like there is any post or not. But what i need is that I need to know the particular date has data inside or not ex. 10/13 has data return true 10/14 has no data return false Link to comment https://forums.phpfreaks.com/topic/177640-asking-for-direction/#findComment-936685 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.