surfer surfer - 1 year ago 75
SQL Question

MySQL INSERT query does not update the DB

attent table :

id int(11) primary key

userID int (11) forigen key from users table

date date

start_time text

end_time text

approv enum default 0

my query :

$sql = "INSERT INTO attent ".
"(id,userID,date,start_time,end_time,approv) ".

$query = mysqli_query($db,$sql);

I got config.php file that help communicate with dB. I did a few insert queries before and all of them work just fine. I can not understand where is my mistake.

Answer Source

Write your query as below:-

"INSERT INTO attent(`id`,`userID`,`date`,`start_time`,`end_time`,`approv`)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download