how to show out into multiple line in mysql?
my code is bellow
$sql=mysql_query("SELECT qualify_question.*,qulify_answar.*,GROUP_CONCAT(Answar_text SEPARATOR 'next')Answar_text FROM qualify_question, qulify_answar
WHERE qualify_question.Id = qulify_answar.Question_id
GROUP BY Question_text");
using this code out will show in this format
i.e. hhhhhh,hhhhhh,jjjjjjj,hhhhhh,
but i want to in this format like
i.e. hhhhhh
hhhhhh
jjjjjjjjjjjjj
hhhhhh
please help me.
thanks
Upendra Pratap ShahiPosted Jun 1, 2015, 1:20 AM
Syed ShanuPosted Jun 1, 2015, 1:12 AM
you can use the union to get bot the result in row wise.but both query should have equal no of column and column names for example you can try like this.
select Question_text as 'Text' FROM qualify_question where yourcondition='yourcondition'group by Question_text