webservice

[insert_php]
$va = $_REQUEST[‘usuario’];
$va = 154;
$cnx = new PDO(«mysql:host=10.0.7.7;dbname=descripciones»,»conexion»,»c69775″);
$res = $cnx->query(«select DEL_DESC from delegaciones order by DEL_CODP_IDE is not null»);
$datos = array();
foreach ($res as $row)
{
$datos[] = $row[0];
}
//$datos[] = «valor aca»;
/* foreach ($res->result() as $row)
{

$datos[]=$row;
}
*/
echo json_encode($datos);
[/insert_php]

PHP Code Snippets Powered By : XYZScripts.com