|
 |
asp_web_howto thread: another cookie question
Message #1 by <odempsey@b...> on Wed, 16 Oct 2002 20:50:16 +0100
|
|
Hi folks
another cookie question following on from the last. If the cookie is written in the form
Response.Cookies("shoppingCart")("ItemNumber")
what is the best way to give each item on the list a unique number, would you give the first item the number 1 and then do a kind of
Select max(itemNumber) like in SQL and use max(itemNumber)+1 type of syntax to increment each item number as it is added or would it
be handier to just use date hours, minutes and seconds to uniquely identify each item.
Kind Regards
Oliver Dempsey
==============================================
Oliver Dempsey
odempsey@b...
www.barrowvale.com
Barrowvale Technology Limited
Web Solutions for Business
Specialists in Dynamic Web Sites
Domain Registration, Hosting, Design,
SMS Text Messaging
Statistics, Online Training
Phone 00353 502 26263
Fax 00353 502 26952
Mobile 00353 86 8219430
==============================================
This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way and notify me immediately.
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 17 Oct 2002 12:03:30 +1000
|
|
Why use item numbers at all?
If you were storing this in a database, what would you use distinguish
between records? Maybe some kind of ProductID? or the ProductName? or
similar? Why not use that as the key of your cookie?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <odempsey@b...>
Subject: [asp_web_howto] another cookie question
: another cookie question following on from the last. If the cookie
: is written in the form Response.Cookies("shoppingCart")("ItemNumber")
: what is the best way to give each item on the list a unique number, would
: you give the first item the number 1 and then do a kind of Select
max(itemNumber)
: like in SQL and use max(itemNumber)+1 type of syntax to increment each
item
: number as it is added or would it be handier to just use date hours,
minutes
: and seconds to uniquely identify each item.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by <odempsey@b...> on Thu, 17 Oct 2002 08:42:01 +0100
|
|
Well the products are website templates and the only thing that can distinguish one website from
another is the domain name. For example the details could be as follows: - mysite.com, 5 page,
template1, blue, search option or it could be mysite2.com, 10 page, template 6, green, no search
option.
Maybe I've answered my own question here, the domain name is probably what I should use to
distinguish
between records.
Kind Regards
Oliver Dempsey
00353 (0)502 26263
00353 (0)86 8219430
----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Thursday, October 17, 2002 3:03 AM
Subject: [asp_web_howto] Re: another cookie question
> Why use item numbers at all?
>
> If you were storing this in a database, what would you use distinguish
> between records? Maybe some kind of ProductID? or the ProductName? or
> similar? Why not use that as the key of your cookie?
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <odempsey@b...>
> Subject: [asp_web_howto] another cookie question
>
>
> : another cookie question following on from the last. If the cookie
> : is written in the form Response.Cookies("shoppingCart")("ItemNumber")
> : what is the best way to give each item on the list a unique number, would
> : you give the first item the number 1 and then do a kind of Select
> max(itemNumber)
> : like in SQL and use max(itemNumber)+1 type of syntax to increment each
> item
> : number as it is added or would it be handier to just use date hours,
> minutes
> : and seconds to uniquely identify each item.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
>
|
|
 |