Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/12/2007, 07:16
Avatar de the_scorpion
the_scorpion
 
Fecha de Ingreso: mayo-2006
Ubicación: Cuba
Mensajes: 696
Antigüedad: 17 años, 11 meses
Puntos: 3
Re: Ayuda con Consulta a Base de Datos

a lo rapido
<?
$dbh=mysql_connect ("localhost", "DBNAME", "PASS") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("somostu2_fanlis");

$sql = 'SELECT DISTINCT `id`, `name` FROM `phpfanlist` WHERE `country` LIKE CONVERT(_utf8 \'anzoategui\' USING latin1) COLLATE latin1_swedish_ci';
$resultado=mysql_query($sql);
while($row = mysql_fetch_array($resultado){
$name = $row [1];//posición
echo "$name";
}
?>

por hay la cosa
__________________
Que hablen mal de uno es espantoso. Pero hay algo peor: que no hablen.
Quien hace, puede equivocarse. Quien nada hace, ya está equivocado".