User Profile

Collapse

Profile Sidebar

Collapse
dqjqb
dqjqb
Last Activity: Jun 22 '16, 12:34 PM
Joined: Jun 16 '16
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dqjqb
    started a topic MySQL to JSON, trouble while creating a nested array.
    in PHP

    MySQL to JSON, trouble while creating a nested array.

    I'm trying to get a JSON-file looking like this:

    Code:
    [
        [
        'Disease', [ latitude, longitude, magnitude, latitude, longitude, magnitude, ... ]
        ],
        [
        'Disease', [ latitude, longitude, magnitude, latitude, longitude, magnitude, ... ]
        ]
    ];
    This is the current code:

    Code:
    $sqlDisease = mysql_query("SELECT DISTINCT Disease FROM DiseaseData")
    ...
    See more | Go to post

  • dqjqb
    started a topic cURL not working while fetching Google API data
    in PHP

    cURL not working while fetching Google API data

    So, I'm trying to fetch API-data using cURL, but I get the message "fail" from the else-statement in the code below.
    The API call is Google geocode for fetching coordinates.

    The code:

    Code:
     <?php 
        require_once('../db.php');
        $api_key = "somekey";
        $sqlQuery = mysql_query("SELECT `County` FROM `table`"); 
        $ch = curl_init();
    ...
    See more | Go to post
No activity results to display
Show More
Working...