-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaver.php
More file actions
66 lines (41 loc) · 1.52 KB
/
Copy pathaver.php
File metadata and controls
66 lines (41 loc) · 1.52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
// $cnc variable de la coneccion
include 'coneccion.php';
// $sth = $cnc->prepare("SELECT 'nombre' FROM 'peliculas'");
// $sth->execute( );
// $cuenta_col = $sth->columnCount();
// print("Antes de execute(), el conjunto de resultados tiene $cuenta_col columnas (debería ser 0)\n");
/* seleccionar este funciona*/
// $gsent = $cnc->prepare("SELECT * FROM peliculas");
// $gsent->execute();
// while($result = $gsent->fetch(PDO::FETCH_ASSOC))
// // $result = $gsent->fetch(PDO::FETCH_ASSOC);
// {
// echo $result['nombre'] . '<br>';
// echo $result['genero'] . '<br>';
// }
/*insertar datos funciona */
// $nombre = 'nemo';
// $genero = 'suspenso';
// $capitulos = '20';
// $inser = "INSERT INTO peliculas (nombre, genero, capitlos) VALUES (?,?,?)";
// $objet = $cnc->prepare($inser);
// $salio = $objet->execute([$nombre,$genero,$capitulos]);
/*funcion YUPIIII genera una tabla*/
// $tbl = "CREATE TABLE newtest . ingles ( id INT NOT NULL AUTO_INCREMENT , nombre VARCHAR(120) NOT NULL , `genero` VARCHAR(200) NOT NULL , capitlos INT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB";
// $genera_tabla = $cnc->prepare($tbl);
// $v = $genera_tabla->execute();
// if($v == true){
// echo 'func';
// }else{
// echo 'no func';
// }
/* buena practica*/
// try {
// echo inverse() . "\n";
// } catch (Exception $e) {
// echo 'Excepción capturada: ', $e->getMessage(), "\n";
// } finally {
// echo "Primer finally.\n";
// }
?>