Hi,
Tuesday, January 14, 2003, 1:09:10 PM, you wrote:
ES> I have the following problem:
ES> I have a DB named 'fotografias' with the following information:
ES> ind indice_bio url
ES> 1 2 ../images/agosti.jpg
ES> 2 2 ../images/militar.jpg
ES> 3 2 hgfhgfh
ES> 4 2 eze
ES> 5 5 ezequi
ES> ind, indice_bio and url are fields names.
ES> I wrote the following code:
ES> <?php
ES> $dbase = mysql_connect("localhost", user , password);
ES> mysql_select_db(historia,$dbase);
ES> $respuesta = mysql_query("SELECT * FROM fotografias where indice_bio=$id",
ES> $dbase);
ES> $row1 = mysql_fetch_array($respuesta);
ES> echo("<center>");
ES> echo('<img border="0" src="../images/foto.wmf" width="62" height="66">');
ES> echo('<b>Hag� Click para ver las fotograf�as disponibles</b>');
ES> echo("<br>");
ES> echo("<br>");
ES> while($row1 = mysql_fetch_array($respuesta))
ES> printf("<tr><td> %s </td></tr>", $row1["url"]);
ES> echo("<br>");
ES> }
ES> mysql_free_result($respuesta);
ES> mysql_close($dbase);
?>>
ES> The problem is that when I retrieve the info, for example with id=2, I only
ES> get
ES> ../images/militar.jpg
ES> hgfhgfh
ES> eze
ES> I do not get
ES> ../images/agosti.jpg
ES> Any idea?
ES> Thanks
ES> Ezequiel
ES> Ps. The page is located at http://www.historiadelpais.com.ar/bio.php?id=2
$respuesta = mysql_query("SELECT * FROM fotografias where indice_bio=$id",$dbase);
$row1 = mysql_fetch_array($respuesta); <<<<<<<< get rid of this line, you don't
need it.
echo("<center>");
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php