Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/06/2011, 09:28
privatefta
(Desactivado)
 
Fecha de Ingreso: septiembre-2010
Mensajes: 498
Antigüedad: 13 años, 7 meses
Puntos: 5
Problemas con mysql_db_query

hola es que tengo este código para print en xml

Código PHP:
Ver original
  1. <?php
  2.  
  3. // Edit this 4 strings to match your system
  4. $host = "localhost";
  5. $user = "panel";
  6. $pass = "panellenap";
  7. $db = "panel";
  8.  
  9. $conn = @mysql_connect($host,$user,$pass) or die ("ERROR! No connection to database!");
  10. $sql = mysql_db_query($db,"SELECT * FROM usuarios ORDER BY id_usuario ASC");
  11. echo "<xml-user-manager ver=\"1.0\">\n";
  12. while($line=mysql_fetch_row($sql)) {
  13.     if ($line[2] == "") :
  14.         $name = "";
  15.     else :
  16.         $name = "name=\"".$line[2]."\" ";
  17.     endif;
  18.    
  19.     if ($line[3] == "") :
  20.         $password = "";
  21.     else :
  22.         $password = "password=\"".$line[3]."\" ";
  23.     endif;
  24.    
  25.     if ($line[6] == "") :
  26.         $profiles = "";
  27.     else :
  28.         $profiles = "profiles=\"".$line[6]."\" ";
  29.     endif;
  30.    
  31.     if ($line[7] == "") :
  32.         $maxconnections = "";
  33.     else :
  34.         $maxconnections = "max-connections=\"".$line[7]."\" ";
  35.     endif;
  36.  
  37.     if ($line[8] == "") :
  38.         $enabled = "";
  39.     else :
  40.         $enabled = "enabled=\"".$line[8]."\" ";
  41.     endif;
  42.    
  43.     if ($line[9] == "false" OR $line[9] == "") :
  44.         $mapexclude = "";
  45.     else :
  46.         $mapexclude = "map-exclude=\"".$line[9]."\" ";
  47.     endif;
  48.    
  49.     if ($line[10] == "false" OR $line[10] == "") :
  50.         $debug = "";
  51.     else :
  52.         $debug = "debug=\"".$line[10]."\" ";
  53.     endif;
  54.    
  55.     echo "<user ".$name.$password.$profiles.$maxconnections.$enabled.$mapexclude.$debug."/>\n";
  56. }
  57. echo "</xml-user-manager>";
  58. mysql_close($conn);
  59. ?>

y me tira eror

Deprecated: Function mysql_db_query() is deprecated in C:\xampp\htdocs\panel\genxml\genxml.php on line 10

Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in C:\xampp\htdocs\panel\genxml\genxml.php on line 10