Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Band Website customization

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26006
    LonChaney
    Member

    I purchased the Band Website Template and have come a long way in learning how to incorporate php into a website. This has been a great help for me, thanks. However, I’m trying to customize the site behavior and am having a little trouble. The "shows" page, which connects to the database for the show information, deletes the current show on its date. I would like the show dates to remain on the page until I delete them manually (or for at least a day or 2 after the show). I believe this deleting action is called in a php script, but I’m not sure where it’s coming from. Perhaps the "update.php" file, or the "action.php" file? I’m new to php and would like to figure this out myself, but I’m getting a little frustrated. Any advise on what to look for? Thanks, Lon

    #63600
    LonChaney
    Member

    Sorry, my bad… but this is still on my local box and I was trying to figure it out before I went live. I’m a newbie to php and mysql (but eager to learn) but I think I’ve narrowed it down a bit.

    The Show Schedule seems to be built from this bit of code from build-table.php

    /* build output */
    $query = ‘SELECT show_id, date_starts, stime, venue, url, city, state,
    DATE_FORMAT(date_starts,’%b %e’) as ds
    FROM shows
    WHERE date_starts >= NOW()
    ORDER BY date_starts ASC’;
    $result = mysql_query($query,$DATABASE_LINK) or die(mysql_error().’: ‘.$query);
    if(mysql_num_rows($result))
    {

    I think the line: WHERE date_starts >= NOW() is what is preventing the past dates from showing but I’m not sure how to modify it.
    I hope that is more helpful, thanks again, Lon

    #63644
    LonChaney
    Member

    Thanks ikthius for your help with this. Yes, I’ve searched quite a bit (I always do before posting) but apparently for the wrong terms. I falsely assumed that NOW() was the function and wondered why I couldn’t find any mention of it on the php.net site (I told you I was a newbie!). Now to search for more info on time/date functions…thanks again for setting me on the right path!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.