如何打印 group_concat 函数的输出
how to print the output of group_concat function
如何打印此查询的输出:
$NOTicoun=mysqli_query($conn,"select group_concat(distinct session_id)
from fk_views where comment !='' and onid='3738'");
我试过:mysqli_data_seek
,但结果不理想。在php的早期版本中我们可以使用mysql_result
功能,但在php.
的这个版本中不可用。
您可以使用 Alias
select group_concat(distinct session_id) as yourAlias
然后获取关联数组并用它访问它
$row['yourAlias']
当然还有其他方法
如何打印此查询的输出:
$NOTicoun=mysqli_query($conn,"select group_concat(distinct session_id)
from fk_views where comment !='' and onid='3738'");
我试过:mysqli_data_seek
,但结果不理想。在php的早期版本中我们可以使用mysql_result
功能,但在php.
您可以使用 Alias
select group_concat(distinct session_id) as yourAlias
然后获取关联数组并用它访问它
$row['yourAlias']
当然还有其他方法