Jump to content

How do I pull array from API into database?


jbass350z

Recommended Posts

I am not that great with PHP so I need some help pulling an array from an API into a MYSQL database. I guess the problem is two-fold:
 
1. How should the database tables be setup?
 
2. What is the php to actually perform the insert? I have tried cutting and pasting various code from around the internet but I always end up with errors.
 
Here is what is returned from the API:
 
        

    Array
    (
    [success] => 1
    [return] => Array
        (
            [0] => Array
                (
                    [a] => 22016931
                    [b] => 2014-02-07 15:35:17
                    [c] => 0.00000160
                    [d] => 10011.32572730
                    [e] => 0.01581789
                    [f] => Yes
                )


            [1] => Array
                (
                    [a] => 22016912
                    [b] => 2014-02-07 15:34:56
                    [c] => 0.00000159
                    [d] => 7100.05070406
                    [e] => 0.01121808
                    [f] => Yes
                )


            [2] => Array
                (
                    [a] => 22016911
                    [b] => 2014-02-07 15:34:56
                    [c] => 0.00000158
                    [d] => 13089.15960294
                    [e] => 0.02068087
                    [f] => No
                )




        )


    )

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.