Welcome Guest, Not a member yet? Register   Sign In
XML from result Need HELP!
#1

[eluser]prasie[/eluser]
Code:
<?php
$this->load->dbutil();

$data = $this->session->userdata('data_services');

                if($data['maskapai'] == 0)
             {
                 $airlines = array('airasia','batavia', 'citilink','lion', 'sriwijaya');
             }
             elseif($data['maskapai'] == 1)
             {
                 $airlines = array('airasia');
             }
             elseif($data['maskapai'] == 2)
             {
                 $airlines = array('batavia');
             }
             elseif($data['maskapai'] == 3)
             {
                 $airlines = array('citilink');
             }
             elseif($data['maskapai'] == 4)
             {
                        $airlines = array('garuda');
             }
                    elseif($data['maskapai'] == 5)
             {
                        $airlines = array('lion');
             }
                    elseif($data['maskapai'] == 6)
             {
                       $airlines = array('sriwijaya');
             }
                
                        $from = $data['from'];
                        $to = $data['to'];
                        $depdate = $data['depdate'];
                        $retdate = $data['retdate'];
                        $pax = $data['pax'];
                        $where1 ="(`from` = '$from' and `to` = '$to' and depdate = '$depdate' and pax = '$pax') ";
                        $where2 = "(`from` = '$to' and `to` = '$from' and depdate = '$retdate' and pax = '$pax')";
                        
               if ($data['returnType'] == 'RT')
               {
                $this->db->where($where1);    
    $this->db->where_in('airline', $airlines);
                $this->db->where('last_update >=', time()-7200);
                $this->db->or_where($where2);    
    $this->db->where_in('airline', $airlines);
                $this->db->where('last_update >=', time()-7200);
               }
               elseif ($data['returnType'] == 'OW')
               {
                $this->db->where($where1);    
    $this->db->where_in('airline', $airlines);
                $this->db->where('id','');
               }
   $query = $this->db->get('ticket_cache');

$config = array (
                  'root'    => 'root',
                  'element' => 'element',
                  'newline' => "\n",
                  'tab'     => "\t"
                );

$xml = $this->dbutil->xml_from_result($query,$config);
$this->session->unset_userdata('data_services');
$this->output->set_content_type('text/html');
$this->output->set_output($xml);
?>

all code running fine at my localhost and return the xml correctly
but when try to upload to myserver suddenly there is additional div dunno why seems yesterday works good , will appreciate any suggestion try to google seems find nothing
Code:
<div id="resdebug_scrap_result">pre>Array
(
)
</pre></div>


Messages In This Thread
XML from result Need HELP! - by El Forum - 07-23-2012, 10:16 AM
XML from result Need HELP! - by El Forum - 07-23-2012, 10:44 AM
XML from result Need HELP! - by El Forum - 07-23-2012, 02:42 PM
XML from result Need HELP! - by El Forum - 07-23-2012, 07:13 PM
XML from result Need HELP! - by El Forum - 07-26-2012, 05:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB