Mysql date : 0000-00-00 00:00:00
        Posted  
        
            by jasmine
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by jasmine
        
        
        
        Published on 2010-04-22T06:44:55Z
        Indexed on 
            2010/04/22
            6:53 UTC
        
        
        Read the original article
        Hit count: 196
        
In my query:
       $cselect = mysql_real_escape_string($_POST['cselect']);
       ---------------
       ---------------
       $sql = sprintf("INSERT INTO content
       (id, catID, title, abstract, body, status, published, date, description_meta,   keywords_meta)
        VALUES ('', '%s', '%s','%s','%s','%s','%s','%s','', '' )", $cselect,$chead, $cabst,$ctext, $cp, $cradio,  'TIMESTAMP: Auto NOW()');
ouptput for date is: 0000-00-00 00:00:00. What is wrong in my query? Thanks in advance
© Stack Overflow or respective owner