If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Dynamic Arrays (shopping cart)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-21-06, 17:43
elskan elskan is offline
Registered User
 
Join Date: Apr 2005
Posts: 30
Dynamic Arrays (shopping cart)

Hi Guys

I am writing a page that adds a product to the users cart.

I am trying to write it so that if the product is already in the database the user is given a warning and redirected. If not then it gets added to the database and the user can proceed.

My problem arises when try and pull all of the product ID numbers out to check to see if it is already in the database.

Do I need to put the id numbers in an array? If so how do I check through the returned variables to see if it exists.

I have included a txt file of my code. Its a stripped down version so some bits are missing.

Thanks in advance

Elskan
Attached Files
File Type: txt cart_add.txt (1.0 KB, 57 views)
Reply With Quote
  #2 (permalink)  
Old 03-22-06, 04:31
elskan elskan is offline
Registered User
 
Join Date: Apr 2005
Posts: 30
Fixed it.

Just ran another SQL statement with an approriate WHERE clause.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On