MySQL Problem
| From: | Felipe R. | Date: | Wed, 04 Jun 2003 23:40:54 +0000 |
| Subject: | MySQL Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150279@lists.php.net to get a copy of this message | ||
Hi everyone,
first, sorry to all if my english is so poor.
second, i have the follow question: when i create a existing MySQL DBase,
what happend??
how can i avoid this problem??
i attached my create_table code. Thanks for all
<html>
<head>
<title>Creación de una Base de Datos</title>
</head>
<body>
<h2> Creando Base de Datos</h2>
<?php
$connection = mysql_connect("localhost","ferios","ferios") or die
("No se
puede conectar a MySQL");
if (!$connection) {
die ("No se puede conectar a MySQL");
}
if (mysql_create_db("$nueva_base")) {
print ("     Base de Datos <font color=\"red\"
size=\"5\">$nueva_base</font> Creada
Satisfactoriamente!!<BR><BR>");
$db_list = mysql_list_dbs($connection);
$indice=0;
while($row = mysql_fetch_array($db_list)){
$bases[$indice]=$row[0];
$indice++;
}
mysql_close($connection);
echo "    <B> Las Bases de Datos Disponibles son:
</B><BR>";
for($aux = 0; $aux < $indice; $aux++) {
echo "        
$bases[$aux]<BR>";
}
}else{
print ("Ërror Creando la Base de Datos: ". mysql_error());
}
?>
<font size="3"> <p>Volver a <a
href="http://localhost/administrador.htm">Administrador
de Bases de
Datos</a></font>
<font size="3"> <p>Volver a <a href="http://localhost/nueva_base.htm">Crear
un Base de Datos</a></font>
</body>
</html>