Php 如何从我的表格中选择仅显示一次数据,即使有多个数据?

Php 如何从我的表格中选择仅显示一次数据,即使有多个数据?,php,mysql,Php,Mysql,如何从此表中选择以仅显示不相同的问题\文本? 这实际上是我必须存储在此表中的搜索结果。构建树只输入一次,但有3个结果。因此,我想知道输入的问题数,并显示从此表中输入的问题 question_id question_text field_name lo_category lo_domain 1 Build a tree Build Application Cognitive

如何从此表中选择以仅显示不相同的问题\文本? 这实际上是我必须存储在此表中的搜索结果。构建树只输入一次,但有3个结果。因此,我想知道输入的问题数,并显示从此表中输入的问题

 question_id  question_text   field_name     lo_category             lo_domain  
      1        Build a tree     Build        Application             Cognitive 
      2        Build a tree     Build        Origination             Psychomotor 
      3        Build a tree     Build        Complex overt response  Psychomotor 
      4        describe the..  describe      Knowledge               Cognitive 

你可以用这样的东西

 EG
    Questions
    Build a tree
    describe the..
但问题是,同名的第一行将首先显示

如果你只想得到问题文本。你可以这样做

SELECT * FROM table GROUP BY question_text;
SELECT question_text FROM table GROUP BY question_text;

SELECT DISTINCT(question_text) FROM table;