私はこのコードに取り組んでおり、単純な挿入ステートメントを使用していますが、なぜそれが機能しないのか理解できません。誰かが私が間違っていることを見ることができたら、私に知らせてください。ありがとう!これは私が得ているエラーです:
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 'long,comments)
VALUES (2 ,2012-11-18 21:25:30, 39.3436984, -76.5856958, hh)' at line 1
コードは次のとおりです。
mysql_query ("INSERT INTO incidents (emergency_type,date_time,lat,long,comments)
VALUES (2 ,$catchDate, $catchLat, $catchLong, $catchDescription)") or die(mysql_error());
echo"<br /> Data inserted";