PHP Classes

missing database.sql

Recommend this page to a friend!

      PHP CRUD Application  >  All threads  >  missing database.sql  >  (Un) Subscribe thread alerts  
Subject:missing database.sql
Summary:missing the database.sql
Messages:3
Author:Shaun
Date:2023-12-18 11:08:49
 

  1. missing database.sql   Reply   Report abuse  
Picture of Shaun Shaun - 2023-12-18 11:08:49
Nice work, Nice package, But it's missing the database.sql file.

Regards,
Shaun

  2. Re: missing database.sql   Reply   Report abuse  
Picture of Edgar Rocha Mendonça Edgar Rocha Mendonça - 2023-12-18 16:01:15 - In reply to message 1 from Shaun
Hi Shaun.

I have retried this package to analyze it too and i have noticed that the file database.sql is missing.

So, I saw the source code and I have created the follow structure:

CREATE TABLE `estudante` (
`id` int(10) UNSIGNED NOT NULL,
`nome` varchar(50) NOT NULL,
`numero` varchar(50) NOT NULL,
`data` date NOT NULL,
`classe` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `presenca` (
`id` int(10) UNSIGNED NOT NULL,
`data_presenca` date NOT NULL,
`estudante_id` int(10) NOT NULL,
`presenca` int(3) NOT NULL,
`falta` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `usuarios` (
`id` int(10) UNSIGNED NOT NULL,
`nome` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`senha` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `estudante` ADD PRIMARY KEY (`id`);
ALTER TABLE `presenca` ADD PRIMARY KEY (`id`);
ALTER TABLE `usuarios` ADD PRIMARY KEY (`id`);

ALTER TABLE `estudante` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `presenca` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `usuarios` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;


I tested the application after and it worked very well.

I hope I had helped you!


  3. Re: missing database.sql   Reply   Report abuse  
Picture of Shaun Shaun - 2023-12-18 23:08:53 - In reply to message 2 from Edgar Rocha Mendonça
Wow, thanks Edgar.
Yes, it does help me, now I can check out the package...