使用Group_concat函数从表中检索数据 [英] Retrive data from table with has Group_concat function
本文介绍了使用Group_concat函数从表中检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是使用GROUP_CONCAT()的两个表针对content_ids和content_titles列的结果 并使用','分隔符分隔该数据
This is Result of two table using GROUP_CONCAT() for columns content_ids and content_titles and this data is separated with a ',' separator
我需要的是什么?
使用php时,值必须存储在数组中,并在使用循环时打印.
Using php the values must be stored in a array and should print at using a loop.
有人可以帮助我吗? 谢谢.
can anyone help me? thanks.
推荐答案
以常规方式检索数据.
然后,在读取特定的逗号分隔字段之后,使用 explode()从中获取一个数组.
就这样
Retrieve your data usual way.
Then, after reading particular comma-separated field, use explode() to get an array out of it.
That's all
这篇关于使用Group_concat函数从表中检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文