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

Query Error

Thread began 3/27/2009 3:09 pm by ellis.robert.j337464 | Last modified 3/29/2009 11:30 am by Ray Borduin | 2674 views | 6 replies |

ellis.robert.j337464

Query Error

I made a chart with the wizard, uploaded it to my site, looked at the page and it just shows a chart with not data. I opened the data1.php file and took a look at the query. When I tried to test the query it gave me an error. I then loaded up the db in Navicate and tried to run the query against the db, again and error for the same thing DW was giving me an error. I don't see anything obvious as to why this is throwing an error ....

SELECT CONCAT(LEFT(MONTHNAME(creationDate), 3), ' ', DAY(creationDate), ',', YEAR(creationDate)) AS XLABEL, SUM(amountFound) AS YVALUE FROM tombsdb GROUP BY CONCAT(LEFT(MONTHNAME(creationDate), 3), ' ', DAY(creationDate), ',', YEAR(creationDate)), DAYOFWEEK(creationDate) ORDER BY creationDate ASC, DAYOFWEEK(creationDate) ASC



Any ideas as to what might be causing this error?

1064-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 '(creationDate), ',', YEAR(creationDate)) AS XLABEL, SUM(amountFound)

Sign in to reply to this post

Ray BorduinWebAssist

What is the exact error?

I can't spot the problem.

Sign in to reply to this post

ellis.robert.j337464

1064-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 '(creationDate), ',', YEAR(creationDate)) AS XLABEL, SUM(amountFound)

Sign in to reply to this post

Ray BorduinWebAssist

I copied and pasted that SQL statment and only changed table and column names and it works.

What version of mySQL are you running? What is the data type of creationDate adn amountFound? do either allow null? Do you get the error when you remove the SUM(amountFound) line?

Sign in to reply to this post

ellis.robert.j337464

I believe the SQL version is 4.1.

AmountFound is an integer, can be null

creationDate is a timestamp, can be null, but it auto-enters the creation timestamp

I will test removing the Sum(amountFound) and see what happens

Sign in to reply to this post

ellis.robert.j337464

Fixed, but not really :)

I copied the hosted database to my local machine, which is running Wamp 2.0 with MySQL 5, and the query worked fine. So I created a new database with 1and1 1and1, only this time with MySQL 5 instead of MySQL 4, and it works fine. Not too sure why it wouldn't work with 4, maybe some syntax change or something? I guess that brings me to the question, when Webassist designs their products, are they designed around Mysql 5 or 4?

Thank you for the help and insight!
Bob

Sign in to reply to this post

Ray BorduinWebAssist

Usually we intend to work on both MySQL 4 and MySQL 5 and test on both. If we do have something that only works on MySQL 5 it would be listed in the product requirements section of the details page on our web site for that product.

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