Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Generacja CRUD`a z relacjami, edycja
rad11
post
Post #1





Grupa: Zarejestrowani
Postów: 1 270
Pomógł: 184
Dołączył: 7.10.2012
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Witam,

Próbuję sobie stworzyć generator CRUD. I np mam np taka tabele z relacjami :

  1. CREATE TABLE `users` (
  2. `id_user` INT(11) NOT NULL AUTO_INCREMENT,
  3. `role_id` INT(11) NOT NULL DEFAULT '0',
  4. `password` VARCHAR(50) NOT NULL,
  5. `username` VARCHAR(50) NOT NULL,
  6. `created_at` DATETIME NOT NULL,
  7. `updated_at` DATETIME NOT NULL,
  8. `invheader_id` INT(11) NOT NULL,
  9. PRIMARY KEY (`id_user`),
  10. INDEX `invheader_id` (`invheader_id`),
  11. INDEX `FK_users_roles_hasOne` (`role_id`),
  12. CONSTRAINT `FK_users_invheader_hasMany` FOREIGN KEY (`invheader_id`) REFERENCES `invheader` (`id_invheader`),
  13. CONSTRAINT `FK_users_roles_hasOne` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id_role`)
  14. )


Powstaje pytanie czy podczas edycji takiego rekordu w formularzu powinny się zawieć dane do edycji z tabel referencyjnych czy tylko te dane ktore sa w tabeli podstawowej?

Ten post edytował rad11 15.11.2015, 13:16:47
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.12.2025 - 23:39