Mysql Insert, Auto Insert?

Asked

Viewed 404 times

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 it is not being inserted, my time variable is right I gave an echo to test, my connection to the database is ok.

Wasn’t supposed to send automatic with just this one insert ?

  • What is the error that appears?

1 answer

3


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

INSERT INTO analise (nome_campo) VALUES ( $analise_hora )
  • That was the mistake, Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.