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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQL Error

Thread began 2/26/2010 4:59 pm by account134484 | Last modified 3/02/2010 2:17 pm by Eric Mittman | 782 views | 5 replies |

account134484

MySQL Error

I am getting this error message on the page below after I went through the wizard and the uploaded all files.

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 'desc, due_date, grade, subject, docs FROM homework LIMIT 0, 5' at line 1

homework_Results.php

Sign in to reply to this post

Jason ByrnesWebAssist

looks like you have a column in your table that is named 'desc', most likely this is you description column.

the word 'desc' is a reserved word in SQL. It is used in the order by claus to have the returned records in Descending order:
ORDER BY col_name DESC


SQL Reserved words should be avoided as table names. a list of reserved words can be found here:
reserved-words.html

Sign in to reply to this post

account134484

Update

I have change the field name and the error is gone.

Does it matter what type the field is? I created the docs field as a blob in the db.

Sign in to reply to this post

Eric Mittman

A blob should be fine, you could also just use a large varchar type of column.

Sign in to reply to this post

account134484

Update

The update and insert pages are populating the Subject dynamic menu.

homework_Results.php

Also for the update page I want to have the entered grade and subject selected, but have a complete list of the subjects and grades listed if they were entered incorrectly.

Sign in to reply to this post

Eric Mittman

Are you keeping the possible subject and grade values in your db? If so then you will need to craft recordsets for the info from these tables to populate the select list.

On the update page you will need to select the list and in the property inspector click on the dynamic button, in here you can set the values to come from your grade or subject recordset and select the value equal to the value from your main recordset.

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...