Re: CSV storage InnoDB?

From: Date: Tue, 27 Nov 2012 01:29:40 +0000
Subject: Re: CSV storage InnoDB?
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-48580@lists.php.net to get a copy of this message
Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers <karl@designdrumm.com> wrote: > Hello all, > Quick question. > What is the best way to store a comma separated list of discount codes in a InnoDB? > Text, varchar, blob, ? I want to be able to store discount codes offered to users in their > profile, in their cart, etc. > So I am thinking of storing the codes as a comma separated list that I can then refer to, add > to or remove codes from. > The codes will change every once and a while and they list of codes may be rather large after > say a year, > so I am shying away from an enum() or anything like that. > > Any help/pointers is greatly appreciated. > > Best, > Karl > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Karl. Is there a way to group these codes? Can profiles be the same for different users? If so another table for the code and a join table for the users to codes might be simpler to manage Bastien

« previous php.db (#48580) next »