I am inquiring about mysql join. I want to make sure that it doesn't print as many numbers as it does.

Asked 2 weeks ago, Updated 2 weeks ago, 2 views

I'm a beginner, so I don't know the exact keyword of the question.

table_student

table_student_info

select t1.student_id, t1.student_name, t2.email from student as t1
    join student_info as t2 on t1.student_id = t2.student_id

The results of sending and receiving the above query are as follows.

What I want is that the value of student_id = 2 comes out only once, not twice.

We are going to print it by turning the loop with php, so I hope the same student_id value is printed once as shown below.

mysql join

2022-09-20 11:01

1 Answers

I think it's this

https://stackoverflow.com/questions/60928890/concentrate-two-rows-in-mysql-but-keep-column-names

Search keyword: mysql column concentrate


2022-09-20 11:01

If you have any answers or tips


© 2022 pinfo. All rights reserved.