Divyesh

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deevyesh Tyagi
    Junior Member
    • Feb 2006
    • 10

    Divyesh

    Login Scripts with Sessions????
    ________
    *** Grab
    Last edited by Deevyesh Tyagi; 04-12-2011, 10:36 PM.
  • megri
    Administrator

    • Mar 2004
    • 968

    #2
    What you need go to
    Hot Scripts is the net's largest PHP, CGI, Perl, JavaScript and ASP script collection and resource web portal. About us describes the detailed review of Hot Scripts.
    Parveen K - Forum Administrator
    SEO India - TalkingCity Forum Rules - Webmaster Forum
    Please Do Not Spam Our Forum

    Comment

    • Deevyesh Tyagi
      Junior Member
      • Feb 2006
      • 10

      #3
      Batch Counting

      This is the current function but the thing is I want to speed the site up and just having that 1 extra connection will affect it loads. This function is called on every page.

      PHP Code:
      function daily_counter() { 
          
      //Daily counter 
          
      $today date("Y",time()) . "-" date("m",time()) . "-" date("d",time()); 
           
          
      $counter_check mysql_query("SELECT counter_id, cdate, counter FROM nn_counter ORDER BY cdate DESC LIMIT 1") or die(mysql_error()); 
          
      $my_counter mysql_fetch_array($counter_check);  
          if (
      $today == $my_counter['cdate']) { 
              
      $update_count mysql_query("UPDATE `nn_counter` SET counter = counter + 1 WHERE cdate = '$today'") or die(mysql_error()); 
          } else { 
              
      $update_count mysql_query("INSERT INTO `nn_counter` (counter_id, cdate, counter) VALUES ('', '$today', 1)") or die(mysql_error()); 
          } 

      ________
      Paxil side effect
      Last edited by Deevyesh Tyagi; 04-12-2011, 10:37 PM.

      Comment

      Working...