-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreloid.php
More file actions
39 lines (33 loc) · 1.15 KB
/
reloid.php
File metadata and controls
39 lines (33 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
//Iniciamos la conexión con la bbdd
$server="localhost";
$db_username="root";
$db_password='';
$database="multi";
$link = mysqli_connect("$server","$db_username","$db_password") or die ("Imposible conectar a mySQL database");
$a= mysqli_select_db($link,"$database") or die("No se pudo conectar a la base de datos");
$conexion = mysql_connect("localhost","root","");
if(!$conexion)
{
die ("No se ha podido encontrar porque: ".mysql_error());
}
mysql_select_db("multi",$conexion);
// Borramos de la BBDD
$sql="TRUNCATE TABLE `tiendas`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `clientes`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `tiendaproducto`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `mensajes`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `clientetienda`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `servtienda`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `clienteproducto`";
$pr=mysqli_query($link,$sql);
$sql="TRUNCATE TABLE `clientesentienda`";
$pr=mysqli_query($link,$sql);
echo "¡Reploid relizado con éxito!";
?>