Thanks, but it wont work.
I have eliminate the space but still the same message.
I have realized that the problem is below that line:
the problem is pointing to the line where i fetch the first variable:
$nombre=$myrow("nombre");

Any other Ideas????
thanks

<?
echo "Resultados de tabla Empresas";
echo"<br>";
    $link = mysql_connect ("localhost:3306", "root", "")
        or die ("Could not connect");
    print ("Connected successfully");

mysql_select_db ("seguros");
$sql="select * from mae_companias";
$result=mysql_query($sql,$link);
echo "<table
align='center'><tr><td></td>Nombre<td>Direccion</td><td>Telefono</td><td>Fax
</td>";

$num=mysql_num_rows($result);
$cur=1;
while($num>=$cur){
$myrow=mysql_fetch_array ($result);

$nombre=$myrow("nombre");
$direccion=$myrow("direccion");
$telefono=$myrow("telefono");
$fax=$myrow("fax");
echo
 "<tr><td>$nombre</td><td>$direccion</td><td>$telefono</td><td>$fax</td>";
 $cur++;
}
echo "</table>";
?>



----- Original Message -----
From: Craig Vincent <[EMAIL PROTECTED]>
To: Fernando Gonzalez <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 8:38 PM
Subject: RE: [PHP-DB] Problem with my first script


> <snip>
> $myrow=mysql_fetch_array ($result);
> </snip>
>
> Remove the space in the function call and it should work fine for you
>
> ie.
>
> $myrow=mysql_fetch_array($result);
>
> Sincerely,
>
> Craig Vincent
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to