I'm getting this error while retrieving data from an Oracle database table using a PHP web service: It shows the warning - unsupported json
Warning: [json] (json_encode_r) type is unsupported, encoded as null.
This is my code:
<?php
require_once("Classes/abc.php");
$h=new NetworkLevel();
$rs=$h->GetWEBSERVICE_STATS();
//$h->Display($rs); -- commented
echo json_encode($rs);
?>
This is my NetworkLevel Class Code:
<?php
require_once('connect.php');
class NetworkLevel
{
public $fdate;
public $tdate;
public function Display($recordset)
{
rs2html($recordset);
}
function GetWEBSERVICE_STATS()
{
$xCon=Connect();
$xCon->SetFetchMode(ADODB_FETCH_ASSOC);
$str="Select * from DEPT";
$recordset= $xCon->Execute($str);
return $recordset;
}
catch (exception $e)
{
var_dump($e);
}
return $recordset;
}
}
?>
Aucun commentaire:
Enregistrer un commentaire