Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/05/2010, 02:56
seckron
 
Fecha de Ingreso: noviembre-2004
Mensajes: 11
Antigüedad: 19 años, 5 meses
Puntos: 0
Problema con array?

ESTIMADOS, TENGO EL SIGUIENTE PROBLEMA. TENGO UNA CLASE CON UNA QUERY QUE CONSULTA A LA BD, TODO BIEN, PERO AL MOSTRAR LOS DATOS CON ARRAY, ME GENERA EL SIGUIENTE PROBLEMA: Parse error: syntax error, unexpected '[' in /HOME/LADIRECION/LINEA 31.

ADJUNTO CODIGOS.

PAGINA QUE MUESTRA DATOS:
<?php
//Connection statement
require_once('Connections/intranetsv.php');

ini_set('display_errors',1);
$rut='CADENARUT';

//clientes
require("clases/consultas.class.php");
$cl_datosCliente=new prueba;
$RT_CANTIDAD_CLIENTES=$cl_datosCliente->clientes($rut,'CANTIDAD');
//$cl_datosCliente->clientes($rut,'DATOS');
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php //PHP ADODB document - made with PHAkt 3.7.1?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?
if($RT_CANTIDAD_CLIENTES > 0){
$var_cantidad_clientes=$cl_datosCliente->clientes($rut,'CANTIDAD');
$array_dato_clientes=$cl_datosCliente->clientes($rut,'DATOS');
$i=0;
while($i < $var_cantidad_clientes){
$array_dato_clientes=[$i][0]; ---> LINEA 31!!!!
echo $array_dato_clientes=[$i][1];
echo $array_dato_clientes=[$i][2];
$i++; } ?>

<? } ?>
</body>
</html>
<?php
//$clientes->Close();
?>

LA CLASE:

<?php
class prueba {

function clientes ($rut,$eldato){

require('Connections/intranet.php');
require('includes/functions.inc.php');

$var_rut=$rut;
$var_la_info=$eldato;

// begin Recordset
// begin Recordset
echo $query_clientes = "SELECT * FROM tabla_clientes WHERE rut_usr='$var_rut'";
$clientes = $intranetsv->SelectLimit($query_clientes) or die($intranetsv->ErrorMsg());
$totalRows_clientes = $clientes->RecordCount();


if($totalRows_clientes >0){

if($var_la_info=='CANTIDAD'){
return $totalRows_clientes;

$clientes->Close();


}

if($var_la_info=='DATOS'){
$array_resultado=$intranet->GetArray[];
return $array_resultado;
}

}else{
//Si no hay información
return 0;

$clientes->Close();
}

}
// end Recordset
// end Recordset




}

?>

ESPERO PUEDAN INDICARME LA SOLUCION PARA EL ERROR

ESPERO PUEDAN INDICARM

Última edición por seckron; 08/05/2010 a las 03:36 Razón: modifiicar