close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQL Error#: 1064 You have an error in your SQL syntax; check the manual that corr

Thread begun 7/31/2009 11:49 am by mick106153 | Last modified 8/04/2009 2:38 pm by Jimmy Wu | 29168 views | 5 replies |

mick106153

MySQL Error#: 1064 You have an error in your SQL syntax; check the manual that corr

Powerstore V2
Any page that is bound to "Recordset (WADAProducts)" gives the error:

" MySQL 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 '' at line 2"

when I click the tab next to "Recordset (WADAProducts)" in the bindings tab.

In "Server Behaviors" opening "Recordset (WADAProducts)" shows the following in "SQL":

"SELECT * , (ProductStock - (SELECT Coalesce(Sum(DetailQuantity),0)
FROM orderdetails INNER JOIN orders ON OrderID = DetailOrderID
WHERE DetailProductID = ProductID AND OrderDate > ProductUpdateDate))*ProductLive AS NumLeft FROM products WHERE ProductID = ParamProductID OR ( -1= ParamProductID2 AND ProductID= ParamSessionProductID)"

test shows no data and my connection is fine.

Mick

PS. I did try finding an answer in your forums and found a few references to a similar problem but no answer.
In one case the person posting resolved the issue on their own without explaining how or why.
I think that all resolutions should be fully fleshed out so as to make it easier for us to troubleshoot on our own without having to take up your valuable time and if one of you were to offer a synopsis of the process to the resolution, dumb it down if you will, I know it would help me and probably others as well.

Sign in to reply to this post

Jimmy Wu

If what you are trying to accomplish is to bind a column to the page, you can use this syntax:
<?php echo $row_WADAProducts["ProductLongDesc"]; ?>

Replace "ProductLongDesc" with the column name you want.

We will continue looking into this issue and hopefully we will be able to find a fix. The store should work even with this issue.

Sign in to reply to this post

mick106153

I don't know what I'm trying to do.
I spend time poking around in the guts of the underlying technology in hopes of furthering my understanding of php and MySQL.
My previous post was in reference to the fact that what I described there, occurs.
And that that may be an incipient cause of some problem of which I may not yet be aware.
If it is not and there is not a resultant cascade of undesirable consequences as you seem to indicate, than I should just ignore it?
Your answer, though appreciated, confuses me as much as the other posts I've read in an attempt to find an answer to this problem.
Could you please present, or point me to, a "roadmap" that illustrates the sequence of events generally necessary to achieve what you've described as a fix.

Thanks

Mick

Sign in to reply to this post

Jimmy Wu

The SQL statement works and does what it should do, but sometimes if the SQL is more complicated, Dreamweaver has trouble reading it. The fix would involve changing the SQL query to something that accomplishes the same task, but can be read by Dreamweaver. This would involve getting a new release of PowerStore out to the users.

As for my response, I wasn't sure what you were attempting to accomplish when you were double clicking on that recordset, so I offered up the solution to a common issue of displaying the value of the recordset column on the page.

The functionality of the store should be fine, however, so if you can, just work around the issue.

Sign in to reply to this post

mick106153

Meant no disrespect

If my response was disrespectful, it wasn't meant to be.
I do appreciate your response. I just get a little frustrated because your (collectivel) skill level is so far beyond my own that you often talk way over my head.
So to sum.
The problem is not with php, MySQL, WebAssist et al or me. It's with Dreamweaver and can therefor be ignored.
Is that correct?

If so, than where do I see what is contained in i.e. Recordset (WADAProducts) if not in the bindings panel since there an error is thrown when trying to view it? If it is even necessary to do so.

As you can probably tell, I'm still quite confused about how all this goes together.

Thanks

Mick

Sign in to reply to this post

Jimmy Wu

Yes, you don't have to worry about that error.

So the code I gave you in the first response was to display the value of a column value of a record in that recordset.

That particular recordset will basically contain information about products that you have added to your PowerStore.

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