I guess you never heard the concept of relational database. How would you be able to link the user to the message? The way you do it would be a mess. If a message record is deleted/wrong inserts you would have a mismatch in primary keys. Furthermore if you later on want to extend with more tables then all the autoincrement keys are not in sync. I suggest you add userid column to the message table. Then you need to insert the user in first SQL insert, have the new user ID returned (you can do this in PHP), do the second SQL2 query adding the message and userid to the message table. With this method you can have several messages for the same user record. And now you have a relationship - Relational Database.
Sir please I will really appreciate it if you could do a video on how to insert into a table that has a foreign key constraint and also teach on auto date with php ..which means when a user click on the submit button they should be a auto date of the registration
I wanna use database tables as options in drop down menu to insert data of different semester's student into different separate tables. how can I do this?
hello, it's beautiful I understood everything but I ask you a query that is inserted in two tables with recovery of identifier auto increment after each request, then inserted into the third table, thank you very much and good continuity.
hi, how do you do for auto increment unique id (same for 2 tables in database) so that we know based on the same id (connected between 2 table)? really appreciate your help on this . thanks
I suggest you add userid column to the message table. Then you need to insert the user in first SQL insert, have the new user ID returned (you can do this in PHP), do the second SQL2 query adding the message and userid to the message table.
I guess you never heard the concept of relational database.
How would you be able to link the user to the message? The way you do it would be a mess. If a message record is deleted/wrong inserts you would have a mismatch in primary keys. Furthermore if you later on want to extend with more tables then all the autoincrement keys are not in sync.
I suggest you add userid column to the message table. Then you need to insert the user in first SQL insert, have the new user ID returned (you can do this in PHP), do the second SQL2 query adding the message and userid to the message table.
With this method you can have several messages for the same user record.
And now you have a relationship - Relational Database.
This video was very helpful... i had lost so much hope in finding a solution
Thank you so much for this. Been looking for this fro 2 months! You got yourself another subscriber. Bravo
thank you so much for this video bro, finally got the answer for my problem👍👍👍👍👍👍👍👍👍👍
Boss kindly do a tutorial on a foreign key, relating two tables together on a database
Thanks indeed, your contribution is the best!
thank you so much for this tutorial , can i you please do it for the foreing key
just the video I needed for my assignment! thanks
Sir please I will really appreciate it if you could do a video on how to insert into a table that has a foreign key constraint and also teach on auto date with php ..which means when a user click on the submit button they should be a auto date of the registration
on auto date just create current timestamp in your database
great but i have a quest, how can we put the id the same i mean in the messages table the id should be the same to the id of the table user
Hi How would i do this if I wanted to insert it into 3 different tables ?
Thank u so much it's help me lot..
Gracias me ha ayudado mucho
I wanna use database tables as options in drop down menu to insert data of different semester's student into different separate tables. how can I do this?
Thanks for the video it was great
thank you man thank you so much its help me a lot.
Thanx brother!
Very useful
Good..
Nice Video Bro
how can i insert into two db table base on gander select
hello, it's beautiful I understood everything but I ask you a query that is inserted in two tables with recovery of identifier auto increment after each request, then inserted into the third table, thank you very much and good continuity.
But id is vering
hi, how do you do for auto increment unique id (same for 2 tables in database) so that we know based on the same id (connected between 2 table)? really appreciate your help on this . thanks
I suggest you add userid column to the message table. Then you need to insert the user in first SQL insert, have the new user ID returned (you can do this in PHP), do the second SQL2 query adding the message and userid to the message table.
May God bless you
Very Helpful
Hello sir please update a video as price qty total with inserting to database.
I tried this code and it worked, although the second time it did not work, and then after that it never worked again, can anyone explain this?
I was thinking you could do this project for me. Do provide your email so we can talk privately.
zegitalmedia@gmail.com
@@zegitalacademy6281Thank you so much for replying, I have sent you an email.
Thanks
Its always failed, why ?
Code plz