I've a example text file below. I need to pass this data to mysql.
and can anyone help with this.
I figure out the way of connecting database,
and the thing I am suffering with is transferring below data to mysql
actually factors are arbitrary so do choices,
so I don't know how many factors and choices there are.
there are a plenty of data I need to handle with
and every data has different number of factor, and choice and also names
this data is just an example.

ignore dots


Phone......MCO Accessory.........VPS Bluetooth.........VPC Bluetooth (FACTORS)
White..... .T950....................off.....................off (CHOICES)
White......C300....................on.....................off (CHOICES)
White......T950....................on.....................off (CHOICES)
White......T950....................off.....................on (CHOICES)
White......C300....................off.....................off (CHOICES)
White..... .C300....................on.....................on (CHOICES)
White..... .C300....................off.....................on (CHOICES)
White..... .T950....................on......................on (CHOICES))

Hi there,
When I've had to keep an arbitrarily long set of parameters in a database in the past, I usually implode the array into a string, seperating the values with tildes and then store that string in a column of type text. I think that's what you're talking about (Storing a list of varying length in a db?)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.