[PHP / MySQL] Display a row from a table
Adjmal
-
dr_melik Posted messages 49 Status Member -
dr_melik Posted messages 49 Status Member -
Hello,
I have a small problem, I’d like to display data from a table but not a full column, I just want to take the data from one row.
My table:
+++++++++++++++++++++++++++
| Pseudo | Nom | Prénom | Age |
+++++++++++++++++++++++++++
| SJT001 | Allymun | Adjmal | 17 |
| SJT002 | Jullien | Philippe | 24 |
| SJT003 | Dupont | Marc | 19 |
+++++++++++++++++++++++++++
Actually, I’d like to take the data of Pseudo, Nom, Prénom, and Age, but only from SJT002.
How to do it?
Thanks!
I have a small problem, I’d like to display data from a table but not a full column, I just want to take the data from one row.
My table:
+++++++++++++++++++++++++++
| Pseudo | Nom | Prénom | Age |
+++++++++++++++++++++++++++
| SJT001 | Allymun | Adjmal | 17 |
| SJT002 | Jullien | Philippe | 24 |
| SJT003 | Dupont | Marc | 19 |
+++++++++++++++++++++++++++
Actually, I’d like to take the data of Pseudo, Nom, Prénom, and Age, but only from SJT002.
How to do it?
Thanks!
4 answers
-
Hi,
The SQL query will return:SELECT Pseudo, Nom, Prénom, Age FROM nom_table WHERE Pseudo = 'SJT002'
See:
http://www.commentcamarche.net/sql/sqlsel.php3 -
-
-
Hi, I found this topic that looks like my problem. If I want to display, for example, people aged 17, and there are three people aged 17, I want to display them one by one separated by a few comments in PHP. How can I do that, and thanks.