Jump to content

dachshund

Members
  • Posts

    312
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

dachshund's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. This is $con, by the way (obviously with correct values): $con = new mysqli('localhost', 'username', 'password', 'database_name');
  2. Thanks, but do you know why it's failing? It works fine in PHP 5
  3. Hi, I'm just changing all my old PHP 5 code to PHP 7, which I'm very new to, and have come across some issues. The below code is giving this error: Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in Any help much appreciated: $sql = "SELECT * FROM content WHERE `live` LIKE '0' AND `featured` LIKE '1'"; $result = mysqli_query($con, $sql); while($rows=mysqli_fetch_assoc($result)){
  4. Is there any easier way to do it. For example something that says after 12th article show this advert div?
  5. very much appreciate your response! that's gone way over my head though - beyond my current capabilities I think
  6. 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
×
×
  • 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.