close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Creating Order History error

Thread began 6/14/2010 8:25 am by nick354316 | Last modified 6/17/2010 8:40 am by nick354316 | 1852 views | 6 replies |

nick354316

Creating Order History error

I have gone through the tutorial several times following the instructions to the letter. When I thought there was a possibility that I was entering the data incorrectly, my frustrations led me to just cut and paste each line as I was instructed.

So, I have been through the Create Order History page and have been unsuccessful. I then turned to the only other support available - the forums. I found that others have been getting the same error going back several years.

When I test the recordset, I get the following:

__________________________
MySQL Error#: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version forthe right syntax to use near '-1 WHERE orderdetails.-1 = WADAOrderID AND orders.OrderUserID = -1 at line 1
_____________________________________

As I may have missed the spaces when retyping that, I have attached a jpg of the error message.

I have tried every possible solution from the forums going back several years, and have not been able to get rid of the error.

And when I test the page, I get the following:

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 '-1 WHERE orderdetails.-1 = WADAOrderID AND orders.OrderUserID = 1 LIMIT 0, 20' at line 1

______________________________

That I am getting an error there isn't surprising in the least as the problem with the recordset dialog (MySQL Error#: 1064 above) is the probable cause of the SQL syntax error.

Attached are two jpg's of the errors.

Please help. I have been spending hours and hours dealing with this and other documentation-related problems, causing incredible frustration and because of the time spent, revenue loss.

Please help me resolve this issue.

Sign in to reply to this post

Jason ByrnesWebAssist

In the Parameters section, the first parameter should be named WADAOrderID instead of DetailOrderID.

Edit the DetailOrderID parameter and change the name to WADAOrderID

Sign in to reply to this post

nick354316

customer order history error.

Thanks, Jason. That worked. At least the syntax error message is gone when I test it. I am up against a deadline and just came to the decision that I will not implement the customer order history until later. I will certainly let you know if I have a problem at that time.

I have a related question. I have set up the administrative back end to the site I am building using Data Assist.

As of right now, when I do a search for orders on the orders_Search.php page without entering any information, the orders_Results.php page shows all orders, with the unique order number (Order ID) as one of the line items. That's fine and the way it is supposed to work. It seems to be the easiest way for my client to search for orders as they come in.

My question is this: Is there a way to link the unique order number (Order ID) on the orders_Results.php page to the summary of the order on the orderdetails_Results.php page so that when my client clicks on the order number, they can see what items have been ordered for just that particular order number?

Right now, and please correct me if I am wrong, they would have to either type, or copy and paste the number into the Order ID search box on the orderdetails_Search.php page, and then do a search which would bring up the details of that particular order on the orderdetails_Results.php page.

It seems like it would be a very logical way to isolate the items on a particular order.

I have attached a jpg that (better) explains what I would like to happen.

I would really like, and this is probably a 'wish list' item, to be able to view, and subsequently print out a summary of the order similar to the 'line item' email receipt that is sent to the customer. As my client physically delivers the items ordered, they will have to print one page from the orders_Results.php page for the visitors delivery information, and then print another copy for the items that were actually ordered.

The only option I am currently aware of would be to print out the email that is sent to the customer, as I have it set up that they are cc'd on each order. However, I have been experiencing a problem with the order number appearing on the email receipt. Contrary to logic, it seems to appear only intermittently. I will open a ticket in the Universal Email section to adress that problem.


Thank you for your help in resolving this matter.

Sign in to reply to this post

Jason ByrnesWebAssist

create a link the orderdetails_Results.php that passes the ID as a query string variable, for example
orderdetails_Results.php?id=31

to do this, select the ID in design view.

In the property inspector, click the Folder icon next to link and select the orderdetails_Results.php page. Then click the perameraters button, set the name of the parameter to 'id' (without the quotes) and click the lightning bolt next to value and select the ID column from the recordset.


Now, on the orderdetails_Results.php, set the Order details recordset to Filter the detailOrderID column on the id query string value being passed, this is done in simple view in the filtering section.

Sign in to reply to this post

nick354316

link from order results page order number to orderdetails results page

Hi Jason,

I may be wrong, but in the first line of your response I assume you meant in the orders_Results.php and not the orderdetails_Results.php as that is where the link to the order details page would be.

So assuming that you meant the orders_Results.php page, I followed your directions, and bound the id parameter to the ID column of the orders recordset. I ended up with the following line of code in the Properties Inspector link window:

orderdetails_Results.php?<?php echo $row_WADAorders['OrderID']; ?>=

I then set the WADAordetails recordset as in the attached image (1.orderdetails_results page recordset.png).

When I then clicked on an order ID number on the orders_Results.php page, I do go to the orderdetails_Results.php page, and get a "no results for your search" message. Here is the link that appears in the address bar for the order I clicked on, minus my project name:

orderdetails_Results.php?53=

And to further complicate matters, with the way I have it set up (as indicated above) I get a "no results for your search" when I go to the orderdetails_Search.php page.

Do you know what I am doing wrong (other than trying to expand from my normal design business)?

Any help would be immensely appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

I meant:
on the order results page, create a link to the order details results page.


the problem is that your link passes the ID value, but does not assign a name.

change:
orderdetails_Results.php?<?php echo $row_WADAorders['OrderID']; ?>=

to:
orderdetails_Results.php?id=<?php echo $row_WADAorders['OrderID']; ?>

Sign in to reply to this post

nick354316

link from order results page order number to orderdetails results page

Hi Jason,

That worked. Thanks so much. I am obviously not a programmer. I purchased the Super Suite and associated WebAssist extensions, solutions, and upgrades (including a Powerstore) hoping to answer a growing demand for the types of things the extensions and solutions were designed to 'assist' me with, but to be honest, I have been considering writing it off as a loss as I have been frustrated at many turns. I assumed that a web designer without PHP experience could somewhat easily implement your extensions and solutions. At least in my case, I was wrong. However, your quick and effective response has restored a little faith in me for your products.

Thanks again, Jason.

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