View Single Post
Old 01-02-2013, 07:04 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,172
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
???

Maybe I didn't understand what you were trying to do. I assumed you just needed:
Code:
CREATE TABLE IF NOT EXISTS custdetail (
    customer_id varchar(100), /* bad idea...should be INT and refer to customer tbl */
    customer_pass1 varchar(100),
    customer_count1 int,
    customer_pass2 varchar(100),
    customer_count2 int,
    customer_pass3 varchar(100),
    customer_count3 int,
    customer_pass4 varchar(100),
    customer_count4 int,
    customer_pass5 varchar(100),
    customer_count5 int
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote