Hello There! Posted May 3, 2004 Share Posted May 3, 2004 Hi, I'm using mysql / php / dreamweaver mx2004. My website currently shows a list of products, each of which can be seen in detail in a popup window. When the product is clicked a URL parameter of the product's unique PRODUCT NUM is passed to the pop up and the appropriate dertails are displayed. What i want to do is have a next button in the popup window that will automatically show the details of the next product i.e PRODUCT NUM + 1 in the product table, rather than having to close the popup and choose another item from the main list. There are 2 ways i thought of doing this: First was 2 use a repeat region and show each product 1 at a time. The trouble with this is that i could not figure a way start the repeat region behaviour from a certain point in the recordset - it always starts at the beginning. Is there any way to create a repeat region and specify the starting record? Secondly was to take the PRODUCT NUM and add a counter so it would go up by one every time the next button in the popup was clicked and that number passed as URL param to pick up the right details when the pop up is reloaded. Trouble with this is I can't figure out how to set up the count and declare the variable a URL param. I presume you use javascript but how to use a js variable as a URL param? do you just use the var name? I tried setting up calling the PRODUCT NUM of the current record as URL param and putting +1 on the end. This did not work and i got this error: 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 LIMIT -1' at line 1 So, I'm having some problems! Am i missing something really simple here? Is there another way? I'm quite new to websites and dreamweaver's been holding my hand for a while now but I'm flummoxed. Any help or advice would be much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/1827-browsing-a-recordset-starting-at-random-record/ Share on other sites More sharing options...
morpheus.100 Posted May 27, 2004 Share Posted May 27, 2004 Press F1 and its all written in the standard manual Quote Link to comment https://forums.phpfreaks.com/topic/1827-browsing-a-recordset-starting-at-random-record/#findComment-6056 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.