From: Diana Montes (
pilimontes .en. hotmail.com)
Date: Mon Apr 05 2004 - 06:11:15 CEST
Hola! lo que pasa es que estoy trabajando en php y tengo
problemas
cuando hago una consulta porque sale el siguiente mensaje:
Warning: mysql_fetch_array(): supplied argument is not a
valid MySQL
result resource in c:\archivos de programa\apache
group\apache\htdocs\sycosoft\applications\sycosoft\data\Mysql\Mysqlin
stitucion.class.php on line 125
el codigo donde esta el error es el siguiente:
function getIdInstitucionPorNombre($nombreInstitucion)
{
$sql="SELECT * FROM institucion WHERE
nombre=$nombreInstitucion";
$this->consult = mysql_query($sql,
$this->connection);
return $this->toArray($this->consult);
}
function toArray($handle)
{
$vector=null;
for($i=0;$row = mysql_fetch_array($handle);$i++){
for ($j = 0; $j < mysql_num_fields($handle); $j++){
$vector[$i][mysql_field_name($handle, $j)] = $row[$j];
}
}
return($vector);
}
Gracias!!
-- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
This archive was generated by hypermail 2.1.7 : Fri May 14 2004 - 16:04:50 CEST