Jump to content

dachshund

Members
  • Posts

    312
  • Joined

  • Last visited

Everything posted by dachshund

  1. Is there any easier way to do it. For example something that says after 12th article show this advert div?
  2. very much appreciate your response! that's gone way over my head though - beyond my current capabilities I think
  3. Hi, On our blog homepage we currently have 12 articles displayed. After 12 articles, I could like to add in an advert, followed by another 12 articles. I just wondered if there's an easy way to do this? Here's our current code: $oldarticles = 12 * $pagenumber - 12; $sql = "SELECT * FROM content WHERE `live` LIKE '0' AND '$today' > `date` ORDER BY date DESC LIMIT $oldarticles,12"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ Thanks
  4. Hi, I have a query which selects posts that are trending (ie. have had more than 600 views after 2 hours of being live), but now I want to be able to add a little label to the trending posts that says "trending" if the ID is included in this query. Hopefully that makes sense. This is the query I have: $sql = "SELECT *, views / HOUR(TIMEDIFF(NOW(), date)) as avg FROM content WHERE date BETWEEN CURDATE() - INTERVAL 30 DAY AND NOW() - INTERVAL 2 HOUR AND views > 600 AND live = '0' ORDER BY avg DESC LIMIT 8";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.