[PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Karl DeSaulniers
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

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Bastien
Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers k...@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

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Karl DeSaulniers
On Nov 26, 2012, at 7:29 PM, Bastien wrote: Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers k...@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

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Karl DeSaulniers
On Nov 26, 2012, at 8:01 PM, Karl DeSaulniers wrote: On Nov 26, 2012, at 7:29 PM, Bastien wrote: Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, Quick question. What is the best way to store a comma separated list of discount codes

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Javier Romero
Unsuscribe me please. Thanks El 26/11/12 23:01, Karl DeSaulniers escribió: On Nov 26, 2012, at 7:29 PM, Bastien wrote: Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, Quick question. What is the best way to store a comma separated list

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Matt Pelmear
Karl, Typically I would do this as multiple rows rather than comma-separated data in one field. If you go this route, you may consider adding an unsigned int primary key (with auto increment) on the discounts table so you consume less storage space and can do joins more quickly.

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread tamouse mailing lists
On Mon, Nov 26, 2012 at 8:10 PM, Karl DeSaulniers k...@designdrumm.com wrote: On Nov 26, 2012, at 8:01 PM, Karl DeSaulniers wrote: On Nov 26, 2012, at 7:29 PM, Bastien wrote: Bastien Koert On 2012-11-26, at 7:43 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, Quick

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Karl DeSaulniers
On Nov 26, 2012, at 9:22 PM, tamouse mailing lists wrote: On Mon, Nov 26, 2012 at 8:10 PM, Karl DeSaulniers k...@designdrumm.com wrote: On Nov 26, 2012, at 8:01 PM, Karl DeSaulniers wrote: On Nov 26, 2012, at 7:29 PM, Bastien wrote: Bastien Koert On 2012-11-26, at 7:43 PM, Karl

Re: [PHP-DB] CSV storage InnoDB?

2012-11-26 Thread Matt Pelmear
BLOB and TEXT are basically the same thing, except that BLOB can be used for storing binary data (like an image). You would only need one additional table to do what I was describing, but if you're dead-set on using a comma separated list then TEXT or LONGTEXT is probably what you want,

Re: [PHP-DB] CSV storage InnoDB? - Solved

2012-11-26 Thread Karl DeSaulniers
You have a valid point there Matt. Not dead set. Table it is. Thanks guys. Best, Karl On Nov 27, 2012, at 12:30 AM, Matt Pelmear wrote: BLOB and TEXT are basically the same thing, except that BLOB can be used for storing binary data (like an image). You would only need one additional