![]() ![]() ![]() Note: I changed the engine to InnoDB and choose CASCADE in both delete and update. I created a third table named it users_groups with two fields userid and groupid … I tried to make a relationship between userid in users_groups and userid in users table and the same relation between groupid fields but it didnt work (When I input any data, the users_groups did not update). ![]() This is what I tried to do after I made some research. Select First and Last name of members who are enrolled in the same group.Insert the group’s information when someone ENROLL in the group.Here you will find the tabular form to add foreign key constrain name, current table column, foreign key database, table and column. Also, I send the group’s information plus his/her email address to the second table. In phpmyadmin, Go to Structure tab, select Relation view as shown in image below. When a user CREATE a group, I insert the group’s information in the first table in the same row where his/her information inserted. Para ello, se necesitan permisos de administrador en MySQL (como root). Solo se necesita cambiar el valor de la variable global FOREIGNKEYCHECKS. Groupid - groupname - numberofmembers - paymentamount - paymentrounds - email. 1 respuesta Ordenado por: 4 Sí, es posible. The primary key for a table can be made up of more than one column, this is known as a composite primary key (or composite key ). If you choose the InnoDB engine you can have foreign keys, but if the engine is MyISAM, you. Userid - firstname - lastname - email - birthday - gender - password - user_level - signup_date - last_login - activated - account_type - account_owner_name - account_routing_number - account_number - shares. If you are using XAMPP, it means the database is a MySQL database. I have two tables in my database, one is called users and the other is called groups. I want to do something on my website, but I still dont know how to do it yet. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |