Mysql Insert, Auto Insert?

2
$insert = mysql_query ( "INSERT INTO analise VALUES ( $analise_hora )" ) ;

I am trying to insert this data with this function automatically when the user enters the page, but is not being inserted, my time variable is right I gave an echo to test, my connection to the database is ok.

Was not it to send automatic only with this insert ?

    
asked by anonymous 18.05.2015 / 18:18

1 answer

3

If you have more than one field in this table, the error happens if it is not defined in which field you want to insert.

INSERT INTO analise (nome_campo) VALUES ( $analise_hora )
    
18.05.2015 / 18:23