Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        function counter($ID,$typ,$shops_ID)
        {
                $query=array
                (
                        "update"        =>      "update
                                                                counter
                                                        set
                                                                impressionCounter = impressionCounter + 1
                                                        where
                                                                ID = $ID
                                                        and
                                                                typ = '$typ'
                                                        and
                                                                shops_ID = $shops_ID
                                                        and 
                                                                date = date_format(NOW(),'%Y-%m-%d')",
                        "insert"        =>      "insert into
                                                                counter
                                                        values
                                                        (
                                                                $ID,
                                                                $shops_ID,
                                                                '$typ',
                                                                date_format(NOW(),'%Y-%m-%d'),
                                                                0,
                                                                0,
                                                                0
                                                        )
                                                        "
                );

                mysql_query ($query['insert']);
                mysql_query ($query['update']);
        }
?>