These forums have been archived and are now read-only.

The new forums are live and can be found at

EVE Technology Lab

  • Topic is locked indefinitely.

Recursion for ESI Data PHP

Blue Payne
Caldari Manufacturing Unit
Caldari Peace and Order
#1 - 2017-07-11 06:11:49 UTC
Hey somebody has some good knowledge in recursion with PHP arrays

I am looking for a PHP function which puts eve data files into a function . the function at the end should display sql inserts according to the data structure returned by ccp

Function should create the structure according to the array / Json file or insert data into the database
Would be ok for me if all fields ar varchar but sub tables should have parentsid in the database so they are inserted 1:n in the dB

Thank you in advance

Blue Payne
Caldari Manufacturing Unit
Caldari Peace and Order
#2 - 2017-07-11 13:16:46 UTC
here is some basic start of what i wanted to do
P.S. i dont want to do it with mongoDB!

you need to have the json file from ccp I included one for example but at then end i wanted to have it work for all nested api draws

anybody has a solution for me how I can iterate and have the mysql query command at the end ? <<< my files
Inactive Seller
Hedion University
Amarr Empire
#3 - 2017-07-11 20:58:36 UTC  |  Edited by: Inactive Seller
In my humble opinion three comments :

1 - Line 26 have < br > use \n instead
2 - The insert have not VALUES clause. If you change your database, have problems later. Write the names of the fields and you will be 50% ahead when need modify.
3 - each row must be full and have two INSERT splited (rows 26 and 33) and no complete can create problems , you and me know one is master and other detail, but the clarity say you must use the full insert in the same LINE, maybe some redundant code but much more readable.

Myself use some similar to this for get the prices of fuzzworks JSON, maybe can be useful to you

All character bazaar done. Finally 39 pilot and 3 can be killed later. This account will be used only for forum interaction, fly safe.