close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update button not redirecting to correct page

Thread began 9/16/2010 4:50 am by dallySP | Last modified 9/17/2010 7:24 am by Jason Byrnes | 1457 views | 5 replies |

dallySP

Update button not redirecting to correct page

Hi - I hope this is an easy solution - I've been trying to get this to work all morning, but no luck, so please help. Quite simply, I want the update button (and the cancel button) on my inventory_Update.php page to redirect to order_Detail.php after update. I've passed the orderID in the query string and the cancel button redirects fine however the orderID doesn't carry over on update. Please tell me what I'm doing wrong. Relevant pages attached.

Attached Files
update pg.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the redirect querystring is getting the ID from the rsOrders recordset
$WA_redirectURL = "orders_Detail.php?OrderID=".$row_rsOrders['OrderID'] ."";



the rsOrders needs a OrderID querysting to be passed into it to filter correctly, but the forms action does not pass this in:

php:
<form  action="inventory_Update.php?InvID=<?php echo(rawurlencode($row_WADAinventory['InvID'])); ?>" method="post" name="WADAUpdateForm" id="WADAUpdateForm">





change the form tag to:

php:
<form  action="inventory_Update.php?InvID=<?php echo(rawurlencode($row_WADAinventory['InvID'])); ?>&OrderID=<?php echo(rawurlencode($row_rsOrders['OrderID'])); ?>" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
Sign in to reply to this post

dallySP

thats brilliant and all fixed - thanks so much.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

dallySP

Actually wanted to add to this, as having done a bit of googling this seems to be a fairly common query, but havent' managed to find the answer. Although the code you gave worked a treat on my local server, when I uploaded to my remote server on update I got the following message:
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay.

Is this something that I can fix within the page code or do I need to contact the hosting provider?

Thanks again.

Sign in to reply to this post

Jason ByrnesWebAssist

my guess is that the problem is being caused by this part of the rsItems recordset:
WHERE items.ItemBrandID=brands.BrandID

It seams odd to me that only one join on the page would cause this error.


try taking that out, and see if the error goes away.

Ultimately, to fix it you will need to contact the host, but if removing that part of the where clause fixes the error, at least you will now that whatever restriction the have for the max join size is ridiculous since recordsets with one, 2 or even 4 joins are very commonplace.

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