tags:

views:

58

answers:

2

This query produces error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Maybe becuase I'm tired, I am not findhing the problem here...

mysqli_query($db, "INSERT INTO `tbl_bugresponse` (`id`, `bugid`, `by`, `content`, `time`) VALUES ('NULL', '$id', '$name', '$content', '$dt'") or die(mysqli_error($db));

thanks:)

+1  A: 

closing bracket on sql is missing, you only have closing bracket for mysqli_query function

bumperbox
Parse error: syntax error, unexpected ')' in /home/radonsys/public_html/apps/viewbug.php on line 11.
Shamil
A: 

You probably want this:

mysqli_query($db, "INSERT INTO `tbl_bugresponse` (`id`, `bugid`, `by`, `content`, `time`) VALUES (NULL, '$id', '$name', '$content', '$dt')") or die(mysqli_error($db));

Also, the query you've provided is open to SQL injection attacks. I'd suggest looking up parameterised queries.

workmad3