Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/11/2007, 13:16
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Duda sobre funciones en PHP

Regresa un arreglo con tu respuesta:
Código PHP:
function TraeRegistro($TablaBD,$NomCampo,$CodDato)
{
$Query mysql_query("select * from $TablaBD where $NomCampo='$CodDato'");
$Result mysql_fetch_array($Query);
$CantResults mysql_num_rows($Query);
mysql_free_result($Query);
return array( 
$Result$CantResults );

Y asi si lo llamas puedes leer los valores:
Código PHP:
$resultado TraeRegistro(...);
$fila $resultado[0];
$cantidad $resultado[1]; 
Saludos,