Kenneth Angulo L
EstudianteJuan Pablo Campuzano Monsalve
EstudianteDaniel G. Parrilla
EstudianteAndrés Felipe Lopez gomez
EstudianteJuan Pablo Campuzano Monsalve
EstudianteOscar Fuentes Esteves
EstudianteJuan Pablo Campuzano Monsalve
EstudianteAndrés Vega
EstudianteDavid Higuera
EstudianteJuan Pablo Campuzano Monsalve
EstudianteFreddy Rafael Peñalver Nuñez
EstudianteBeder Danilo Casa Condori
EstudianteJuan Pablo Campuzano Monsalve
EstudianteBeder Danilo Casa Condori
EstudianteDiego Sigcho Alvarado
EstudianteJuan Pablo Campuzano Monsalve
EstudianteAlejo Ramírez
EstudianteAlejandro Ivan Mendieta
EstudianteAlejandro Ayala Castro
EstudianteAlejandro Ayala Castro
Estudianteeamedranoc1
EstudianteComparto script para crear tabla
CREATE TABLE IF NOT EXISTS `withdrawals` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `payment_method` tinyint(4) NOT NULL, `type` tinyint(4) NOT NULL, `time` timestamp NOT NULL DEFAULT current_timestamp(), `amount` float NOT NULL DEFAULT 0, `description` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB;
Gracias!
Comparto mi Script para crear las tablas
Excelente aporte
¿Qué tipo de SGBD o IDE estás utilizando?
Para los que como yo, ya tienen otros cursos y usan alguna suite como XAMPP, para que el phpMyAdmin les pida el usuario, tienen que abrir el archivo de configuración del phpMyAdmin y cambiar:
$cfg['Servers'][$i]['auth_type'] = 'config';
por
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Y al iniciar les pedirá usuario y password como en el ejemplo del profe. Sé que es más engorroso y poco práctico, pero por si alguien se preguntaba como se hace.
Excelente aporte!
CREATE TABLE `finanzas_personales`.`incomes` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT , `payment_method` TINYINT(1) NOT NULL , `type` TINYINT(1) NOT NULL , `date` TIMESTAMP NOT NULL , `amount` FLOAT NOT NULL , `description` TEXT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
Si quieren clonar la primera tabla puede entrar dentro de la tabla withdrawals buscan en el menu " operaciones" > copiar a tabla > ingresan el nombre de la nueva tabla y guardan.
ahg ví tarde el comentario :c
yo uso HeidiSQL y me parece bien practico, excepto cuando da error jajajaja
Para crear tablas en phpMyAdmin, debes seleccionar tu base de datos, luego hacer clic en "Nuevo" o "Crear tabla", definir el nombre de la tabla y sus columnas, especificando tipo de dato, longitud y atributos. También puedes revisar la clase "Instalación de phpMyAdmin" para más detalles.
¿Alguien en Mayo 2024?
noviembre 25
En que casos es mas apropiado utilizar para fechas un campo Timestamp de uno Date?
Creo que sería más por preferencias
Carlos Eduardo Gómez García, enseña mejor felicitaciones
Aquí en código sql
CREATE TABLE incomes( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `payment_method` TINYINT(1) NOT NULL, `type` TINYINT(1) NOT NULL, `date` TIMESTAMP NOT NULL, `amount` FLOAT NOT NULL, `description` TEXT NOT NULL, PRIMARY KEY (`id`) )CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE TABLE withdrawals( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `payment_method` TINYINT(1) NOT NULL, `type` TINYINT(1) NOT NULL, `date` TIMESTAMP NOT NULL, `amount` FLOAT NOT NULL, `description` TEXT NOT NULL, PRIMARY KEY (`id`) )CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
comparto mi sql
CREATE DATABASE finanzas_personales CHARACTER SET = 'utf8mb4' COLLATE = 'utf8mb4_unicode_ci'; USE finanzas_personales; CREATE TABLE `finanzas_personales`.`incomes` ( `id` SERIAL, `payment_method` TINYINT NOT NULL , `type` TINYINT NOT NULL , `date` TIMESTAMP NOT NULL , `amount` FLOAT NOT NULL , `description` TEXT NOT NULL , `create_reg` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_reg` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE = InnoDB; CREATE TABLE `finanzas_personales`.`withdrawals` ( `id` SERIAL, `payment_method` TINYINT NOT NULL , `type` TINYINT NOT NULL , `date` TIMESTAMP NOT NULL , `amount` FLOAT NOT NULL , `description` TEXT NOT NULL , `create_reg` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_reg` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE = InnoDB;
Para más velocidad
Para copiar tablas en phpmyadmin se dirijen a OPERACIONES y luego buscan este menu. En el nombre de la base datos sigue un punto (.) ponen el nuevo nombre de la tabla y listo