Real quick sql querie question...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Publisher Bucks
    Confirmed User
    • Oct 2018
    • 1330

    #1

    Tech Real quick sql querie question...

    Is there a way to display SQL querie results on a php page based on the date?

    For example, lets say on the 1st it shows 5 results, then on the 10th it shows 10 results, the 15th 15 results... All from the same querie without having to rewrite it and use phodate to display seperate pages?

    If so, what is that function called please so I can do some research and playing about with it.

    Thanks.

    Merry Happy HoliChrismaKwanza to all too
    Extreme Link List - v1.0
  • sarettah
    see you later, I'm gone
    • Oct 2002
    • 14297

    #2
    You can use the php date() function to get the day of the month and then use that as your limit.

    $limit=date('j',time());
    $sql="select * from tablename limit " . $limit;

    .
    All cookies cleared!

    Comment

    • Publisher Bucks
      Confirmed User
      • Oct 2018
      • 1330

      #3
      Originally posted by sarettah
      You can use the php date() function to get the day of the month and then use that as your limit.

      $limit=date('j',time());
      $sql="select * from tablename limit " . $limit;

      .
      Oh, interesting, I figured it'd actually be a lot more involved than that

      Much appreciated, hope you're well
      Extreme Link List - v1.0

      Comment

      Working...