[PHP / MySQL] Display a row from a table

Adjmal -  
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!

4 answers

kilian Posted messages 8675 Registration date   Status Moderator Last intervention   1 526
 
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
1
Adjmal
 
Please...
0
Adjmal
 
It works, thank you very much ;)
0
dr_melik Posted messages 49 Status Member 6
 
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.
0