0

I'm asking for a short, clean example to build from...

I'm new to atk4 and have been working my way through tutorials (etc) - and am also fairly new with PHP etc.. so few things are 'obvious' to me at this point. I have created CRUD screens for all the tables, set up mySQL, and have it all working well; love ATK!

What I have not seen is a simple, minimalist example of how to import a CSV into a DB table - leveraging the power of atk4 which makes things so much simpler.

It seems like a great opportunity to use the CLI, point it at a file, load a model, and insert into a table.

Thanks in advance,

Mark

Mark
  • 27
  • 5
  • http://stackoverflow.com/questions/3025648/import-csv-to-mysql – Vadym Nov 09 '13 at 09:18
  • Looks perfect, thank you! I'll give that a shot. Have you run across an example using atk? Mark – Mark Nov 09 '13 at 22:03
  • That have nothing to do with ATK actually. Just use MySQLs LOAD DATA INFILE syntax. Of course you can inject this in some ATK sourcecode, but if this is a one time job to do, then use just mysql commandline :) – DarkSide Nov 10 '13 at 22:37
  • I installed the phpMyAdmin toolkit over the weekend - and loaded some spreadsheets into the DB. Nice tool. I thought the atk4 might come in handy to do the same, but manage the conversion from plain data (say 'Terms' such as 'Net 30') to a second table through a foreign key (TermsID instead) - with a separate table that contains a list of valid Terms... you get the idea. Thanks again, Mark – Mark Nov 12 '13 at 21:56
  • As I said before - that's no way related with ATK4 as far as I understand your question & comments. – DarkSide Nov 13 '13 at 07:35
  • For advanced MySQL DB management try MySQL WorkBench. It have some bugs, but it's very nice and useful. Especially when you need to synchronize your DB structure with models etc. – DarkSide Nov 13 '13 at 07:36
  • I've loaded both MySQL WorkBench and phpMyAdmin - each has it's merits (thank you). phpMyAdmin has the import CSV utility built right in, and it works quite well. In particular, I like that you can give it a list of the fields such that you can load one subset of the table's columns from CSV-A, another from CSV-B, etc. I appreciate your assistance - Thanks. Mark – Mark Nov 15 '13 at 19:24

0 Answers0