Jump to content


  • Posts

  • Joined

  • Last visited

Community Answers

  1. Lukeidiot's post in MySQL displaying results based on day was marked as the answer   
    Actually, here's what I came up with (didnt include the quotes tho, didnt really understand a good way to do it.)
    <p>Quote of the day: <i>Don't watch the clock; do what it does. Keep going.</i></p> <?php $rowdates = mysqli_query($connect, "SELECT DISTINCT datestamp FROM links ORDER BY datestamp DESC"); $dates = array(); while($row = mysqli_fetch_assoc($rowdates)) {     $dates[] = $row; } ?> <?php foreach($dates as $value) { ?> <h1><?php echo date('M d Y', strtotime($value['datestamp'])); ?></h1> <strong>Today's Links</strong> <ul> <?php     foreach($value as $key => $val) {       $sql_links = mysqli_query($connect, "SELECT * FROM links WHERE datestamp = '$val' ORDER BY timestamp DESC, CHAR_LENGTH(description)");       while($row_links = mysqli_fetch_array($sql_links)){       ?>       <li><a href="<?php echo $row_links['url']; ?>"><?php echo $row_links['description']; ?></a></li>       <?php }     } ?> </ul> <hr style="border: 1px dashed grey;"> <?php } ?>
  • 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.