RE:[PHP-ES] Asunto: [PHP-ES] Un único query, varios resultados???
| From: | Gabriel Falcone | Date: | Wed, 15 Jan 2003 13:51:00 +0000 |
| Subject: | RE:[PHP-ES] Asunto: [PHP-ES] Un único query, varios resultados??? | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-31210@lists.php.net to get a copy of this message | ||
mira, he probado esto y funciona muy bien:
<?php
$conn = mysql_connect("xxx.xxx.xxx.xxx","root","");
mysql_select_db("db",$conn);
$sql = "SELECT * FROM empresas";
result = mysql_query($sql)
echo "----------------------------<br>";
while ($row = mysql_fetch_array($result)) {
echo $row["ID_EMPRESA"]."<br>";
}
echo "----------------------------<br>";
mysql_data_seek($result,0); // esto mueve el puntero interno de nuevo al principio
while ($row = mysql_fetch_array($result)) {
echo $row["ID_EMPRESA"]."<br>";
}
echo "----------------------------<br>";
?>
__________________________________________________
Todavía no tenés tu Ciudad Internet Mail? Obtenelo ahora! - http://webmail.ciudad.com.ar
Descargá Gratis el nuevo Internet Explorer 6.0, el mejor software para actualizar tu PC.
http://www.ciudad.com.ar/ar/servicios/ie/