How can I enter data in multiple table in PHP using $result ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I enter data in multiple table in PHP using $result ?

21st Dec 2016, 8:27 PM
Vyom Srivastava
Vyom Srivastava - avatar
8 Answers
+ 4
Ok, so I just took the liberty of scratching down the inner and outer statements with the php code to it. Just for you. Be kind and take a look at them in my profile's codes-section. :-) Is this what you were asking for?
21st Dec 2016, 9:02 PM
Tristan McCullen
Tristan McCullen - avatar
+ 3
No problem. Do you want to use with or without SQL join statements? You and I will deal with this in no time. :-)
21st Dec 2016, 8:41 PM
Tristan McCullen
Tristan McCullen - avatar
+ 3
Did you find what you were looking for? Or do you want me to keep the scripts on there a little longer? just comment or rate the codes on my profile when you are done with them. :)
21st Dec 2016, 9:24 PM
Tristan McCullen
Tristan McCullen - avatar
+ 2
Roger that. A moment please :)
21st Dec 2016, 8:43 PM
Tristan McCullen
Tristan McCullen - avatar
+ 2
SELECT tbl_a.column1 , tbl_a.column2 tbl_b.column1 , tbl_b.column2 FROM tbl_a INNER JOIN tbl_b ON tbl_a.commonfield=tbl_b.commonfield SELECT tbl_a.column1 , tbl_a.column2 tbl_b.column1 , tbl_b.column2 FROM tbl_a LEFT OUTER JOIN tbl_b ON tbl_a.commonfield=tbl_b.commonfield
21st Dec 2016, 8:49 PM
Tristan McCullen
Tristan McCullen - avatar
+ 1
with sql @Coding
21st Dec 2016, 8:42 PM
Vyom Srivastava
Vyom Srivastava - avatar
+ 1
@Coding Umm i guess this is nt what I'm looking for. suppose we have tables table1(fname, lname) and table2(fname). we have to store $a in both fname and $b in table1's lname only. How would you insert this?
21st Dec 2016, 8:52 PM
Vyom Srivastava
Vyom Srivastava - avatar
0
sure sir😉@Coding
21st Dec 2016, 8:44 PM
Vyom Srivastava
Vyom Srivastava - avatar