Give help. Get help.

  • # September 5, 2009 at 9:38 pm

    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

    # September 8, 2009 at 4:49 pm

    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);

    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

    # September 9, 2009 at 9:19 am

    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 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)

You must be logged in to reply to this topic.