inserting data into two db tables using php

preview_player
Показать описание
How to insert data into two different tables in the database using php
Рекомендации по теме
Комментарии
Автор

thank you so much for this video bro, finally got the answer for my problem👍👍👍👍👍👍👍👍👍👍

rakaadiprasetya
Автор

Thank you so much for this. Been looking for this fro 2 months! You got yourself another subscriber. Bravo

bstechideas
Автор

This video was very helpful... i had lost so much hope in finding a solution

kotimunkansi
Автор

Thanks indeed, your contribution is the best!

dennischarles
Автор

just the video I needed for my assignment! thanks

sharthakrai
Автор

Thank u so much it's help me lot..

samtadhanve
Автор

thank you man thank you so much its help me a lot.

priyankasawant
Автор

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.

justgotravel
Автор

Nice Video Bro
how can i insert into two db table base on gander select

balogunsemako
Автор

Boss kindly do a tutorial on a foreign key, relating two tables together on a database

johnjack
Автор

thank you so much for this tutorial, can i you please do it for the foreing key

niwamicha
Автор

Hi How would i do this if I wanted to insert it into 3 different tables ?

Shrzza
Автор

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

diedsoul
Автор

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?

kainatit
Автор

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

afrikblog
Автор

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

afiqahsaid
Автор

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.

mouradmessaoud
Автор

Hello sir please update a video as price qty total with inserting to database.

akhilkazi
Автор

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?

abrakadabrajordan
Автор

I was thinking you could do this project for me. Do provide your email so we can talk privately.

therandompostguy
welcome to shbcf.ru