Jump to content

Awards


Xtremer360

Recommended Posts

So inside my custom CMS i'm developing I have a module that controls various things like adding/editing awards, adding/editing award shows, and viewing voteCounts for the awardshows and for the individual nominees. Now the question I have is if there is a way without having to have the user make input to close the voting to have it actually close it by itself.

Link to comment
https://forums.phpfreaks.com/topic/235734-awards/
Share on other sites

Well I tried this and no matter what it puts the value into that dateExpires as 0000-00-00

 

$year = date('Y');       
        $query = "INSERT INTO `awardsShows` 
                (awardsDate, statusID, creatorID, dateCreated, dateExpires) 
            VALUES 
                ('".$date."','".$statusID."','".$userID."', NOW(), '".$year."'-12-31)";
        mysqli_query($dbc, $query);
        $result = "good";

Link to comment
https://forums.phpfreaks.com/topic/235734-awards/#findComment-1211707
Share on other sites

Try putting your date together before the query.

 

 

$year = date('Y');     

$year .= "-12-31";

 

        $query = "INSERT INTO `awardsShows`

                (awardsDate, statusID, creatorID, dateCreated, dateExpires)

            VALUES

                ('".$date."','".$statusID."','".$userID."', NOW(), '".$year."')";

        mysqli_query($dbc, $query);

        $result = "good";

Link to comment
https://forums.phpfreaks.com/topic/235734-awards/#findComment-1211715
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.