close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Getting error "There is an error in your SQL syntax."

Thread began 11/12/2015 10:29 am by Ian | Last modified 11/20/2015 5:22 pm by Ray Borduin | 301 views | 5 replies |

Ian

Getting error "There is an error in your SQL syntax."

The message is not very helpful I know, but I cannot see why I am getting it.I have rebuilt the file several times to no avail. I have copied a file that carries out an identical function, amended it to take into account the difference in table and field names. That too produces the error.
I am a newby to this so please bear with me. I have created this site using tutorials from Adobe and your web site tutorials.
Attached are two files which as far as I can see are identical (apart for the obvious need for different table and field names). One works, the other doesn't.
I have looked at the SQL database and that too seem OK.

I have spent hours on this so would appreciate any help you can offer. Thank you.

Attached Files
File that does not work.txt
File that works.txt
Sign in to reply to this post

Ray BorduinWebAssist

You can turn on debug in the queryobj.php and rsobj.php file and it will give you the true error. It is turned off by default to prevent too much information for would-be hackers.

In this case the issue is that you have a column named 'date' which is a reserved word in SQL. I'd rename that column to cg_date and that should solve it.

Sign in to reply to this post

Ian

Thank you Ray, both for the general (re debug) and the specific (date being a reserved word) answers.That explains why all the other sections of the Terrier worked and this one didn't. For some reason I used date_recorded for all the others, so of course they worked!

Ian

Sign in to reply to this post

Ian

SQL errors

Good day Ray.
You mentioned in a reply above that I can switch on debug in the queryobj.php and rsobj.php files. I had a look at these files but am not certain which lines to change. Could you explain what line(s) to change please. I have hit another SQL error and it would be a better learning experience if I could try and solve it myself.
Many thanks.
Ian

Sign in to reply to this post

Ray BorduinWebAssist

In the latest version of those files you will find this line near the top:
$this->Debug = false;

just update that line to true and upload it.

Sign in to reply to this post

Ian

Thanks Ray - sorry for delay in acknowledging your help.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...