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