Re: creating a shopping cart.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



depends imho there are a lot of reasons to use a db approach, unless
you are working on a really poor system,
first is persistent in any case you'll never lost an item
is the only way to make your software scalable to hundreds of users,
using array you have everything in memory, you must set up your
persistent system unless you trust a lot sessions that basically is a
file on disk
 but as everything it's up to you

I really suggest you to go on db I can't see any disadvantage
bye

2005/10/1, Robert Cummings <robert@xxxxxxxxxxxxx>:
> On Sat, 2005-10-01 at 11:41, adriano ghezzi wrote:
> > you need a db based approach, just setup a couple of tables in mysql
> >
> > items table
> > one record per item
> >
> > current cart table
> > one record per each item added to cart with unique session id
> >
> > order table
> > one record per each item ordered with unique order id
> >
> > you'll transfer records here from current cart when user checkout
>
> A DB approach is nice, but not necessary. Serialization of a shopping
> cart array that contains the contents of the cart is sufficient. While a
> DB is a natural solution, I've heard of systems that use the file system
> or even email the request to a fulfillment address.
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for       |
> | creating re-usable components quickly and easily.          |
> `------------------------------------------------------------'
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux