0

I know that you can make a field in a MySQL table a CSV type of field. But, I don't know anything about using it, writing to it, reading it, etc.

Is there information online somewhere? It's not in the large book on PHP/MySql that I bought which is kind of frustrating.

I'm needing to make a table within a table and I'm assuming a CSV field type is the way to do this?

PiotrWolkowski
  • 8,408
  • 6
  • 48
  • 68
Jonathan Grant
  • 143
  • 2
  • 15
  • I don't think there is a CSV data type. Generally, having a table within a table is a bad idea and there's likely to be a better way, what is it you want to build? – Pekka Apr 24 '15 at 18:17
  • possible duplicate? http://stackoverflow.com/questions/3635166/how-to-import-csv-file-to-mysql-table – Nick Bailey Apr 24 '15 at 18:18
  • Not a duplicate. But, I'm realizing I was mixing up fgetcsv with field types. – Jonathan Grant Apr 24 '15 at 18:28

1 Answers1

1

Mysql does not have a CSV type. You are either thinking of another database engine or possibly thinking of an enumerated datatype which, while it does not create a table within a table, is a dictionary of values.

Here are two links that provide more info on datatypes in Mysql:

mysql-data-types

dev.mysql/data-types

You can define your own datatypes in postgres. More info here. Although, I do not think that you can create a "csv (table within table) datatype".

BK435
  • 3,076
  • 3
  • 19
  • 27