예제 #1
0
           //$data['results'][$k]['user_info'] = $res3;
           //$data['results'][$k]['tags'] = $res4;
         }
       }*/
     break;
     //getOne
 //getOne
 case 'getOne':
     //http://bootstrap.mkgalaxy.com/svnprojects/horo/records.php
     //Get Params
     //?action=getOne&id=15
     if (empty($_REQUEST['id'])) {
         throw new Exception('missing id');
     }
     $DbTools = new DbTools();
     $data = $DbTools->getOne($tableName, $tableTag, $_REQUEST['id']);
     $return['data'] = $data;
     /*$q = 'select * from '.$tableName.' WHERE id = ?';
       $res = $Models_General->fetchRow($q, array($_REQUEST['id']), TIMESMALL);
       $q = 'select * from locations WHERE location_id = ?';
       $res2 = $Models_General->fetchRow($q, array($res['location_id']), TIMEBIG);
       $q = 'select * from users_info WHERE users_info_id = ?';
       $res3 = $Models_General->fetchRow($q, array($res['users_info_id']), TIMEBIG);
       $res3['users_info_full'] = json_decode($res3['users_info'], 1);
       $q = 'select * from '.$tableTag.' WHERE id = ?';
       $res4 = $Models_General->fetchAll($q, array($res['id']), TIMESMALL);
       $data = array();
       $data = $res;
       $data['location'] = $res2;
       $data['user_info'] = $res3;
       $data['tags'] = $res4;