etrader Posted July 25, 2011 Share Posted July 25, 2011 I capture a list of my articles from mysql by this command mysql_query("SELECT * FROM Text WHERE Key='$key'") Now I added a column for published and draft to be identified by 1 and 0, respectively. What is the best way to show only published articles? Adding a WHERE condition? What is the most common method in major CMSes? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242737-getting-published-articles-from-mysql/ Share on other sites More sharing options...
trq Posted July 25, 2011 Share Posted July 25, 2011 mysql_query("SELECT * FROM Text WHERE Key='$key' && status = 1"); Quote Link to comment https://forums.phpfreaks.com/topic/242737-getting-published-articles-from-mysql/#findComment-1246731 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.