0

here is my code:

$user_detail = $client->fetch("https://app.asana.com/api/1.0/users/"
    .$response['result']['data'][$i]['id'].'.json');


echo  $q="INSERT INTO `asana_users`(`Name`, `Email`,`Workspaces`) VALUES  ('".$user_detail['result']['data']['name']."',
    '".$user_detail['result']['data']['email']."','" .implode("'),
    ('"$user_detail['result']['data']['workspaces'][$i])."') "; 

$user_fetch = mysql_query($q);
  1. Thing i want to insert data of

               [workspaces] => Array
                    (
                        [0] => Array
                            (
                                [id] => ********
                                [name] => a.com
                            )
    
                        [1] => Array
                            (
                                [id] => **********
                                [name] => Personal Projects
                            )
    

    here is my array fetched now i want to add index 0 contains id , name in workplace field.

  2. secondly how to fetch data

  3. please suggest

            Array
             (
          [result] => Array
                (
            [data] => Array
            (
                [id] => ****
                [name] => hiuh
                [email] => a@d.com
                [photo] => 
                [workspaces] => Array
                    (
                        [0] => Array
                            (
                                [id] => 1
                                [name] => a.com
                            )
    
                        [1] => Array
                            (
                                [id] => 494
                                [name] => Personal Projects
                            )
    
                    )
    
            )
    

    i want like that if i want fetch workspaces name then i could fetch whole workspce
    data

mohd afeef
  • 35
  • 1
  • 10

0 Answers0