While attempting to use my forum posting system, I received a mysql error that said to look for the correct syntax to use around '' on line 1. I attempted to reproduce the error but was unable to do so. Any ideas on what cause this and how to prevent is from happening again? How can it have a problem with nothing?

Recommended Answers

All 2 Replies

You might check the error logs to see if it holds something more meaningful. If you can pinpoint which query is failing, print it to screen to see if there's a problem with the query.

Mysql often gives very unhelpful error messages, so no change there.

Did you use mysql_real_escape_string to process the variables? That often fixes otherwise incomprehensible errors.

If not, try cutting the query into smaller pieces and submitting one bit at a time to see if you can pinpoint where the problem is

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.