PHP mysql auto insert timestamp

后端 未结 4 1690
萌比男神i
萌比男神i 2021-02-14 02:32

Say I have a table name auto_parts with these fields. id, part, price, timestamp and I insert a new row via php as so:

$query = \"insert into auto_p         


        
4条回答
  •  借酒劲吻你
    2021-02-14 02:40

    $query = "insert into auto_parts(id, part, price, timestamp)
      values(1, 'axle', 200, 'NOW()')"
    mysql_query($query);
    

提交回复
热议问题