mySQL groupconcat返回BLOB xxxB/Kib [英] mySQL groupconcat returning BLOB xxxB / Kib

查看:287
本文介绍了mySQL groupconcat返回BLOB xxxB/Kib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据成员的建议和上一篇文章,我正在对Interspire购物车数据库中的多个表进行查询,如下所示:

On advice from a member and a previous post I'm running a query against multiple tables on an interspire shopping cart database that looks like this:

SELECT c.customerid, c.custconfirstname, c.custconemail, o.ordstatus, o.orddate, GROUP_CONCAT(  'Order Id: ', orderid,  ' | Product name: ', ordprodname,  ' | Quantity: ', ordprodqty,  '<br>' ) AS ordered_items
FROM isc_customers c
LEFT OUTER JOIN isc_orders o ON o.ordcustid = c.customerid
LEFT OUTER JOIN isc_order_products op ON op.orderorderid = o.orderid
LEFT OUTER JOIN isc_product_images pi ON pi.imageprodid = op.orderprodid
GROUP BY c.customerid
HAVING COUNT( DISTINCT o.ordcustid ) >0
AND o.ordstatus = 0
AND o.orddate < UNIX_TIMESTAMP( ) -  '18000'
AND o.orddate > UNIX_TIMESTAMP( ) -  '259200'

我进入phpmyadmin的结果如下:

The result I'm getting in phpmyadmin looks like this:

customerid  custconfirstname    custconemail        ordstatus   orddate     ordered_items
6532        Cust1               CUST1@EXAMPLE.COM   0           1337502962  [BLOB - 498B]
5522        Cust2               CUST2@EXAMPLE.COM   0           1337670453  [BLOB - 284B]
4321        Cust3               CUST3@EXAMPLE.COM   0           1337507476  [BLOB - 521B]
1235        Cust4               CUST4@EXAMPLE.COM   0           1337577095  [BLOB - 1.0  KiB]
9560        Cust5               CUST5@EXAMPLE.COM   0           1337518452  [BLOB - 1.0  KiB]

当我尝试在php页面中回显结果以对其进行测试时,什么也没有返回.我只是想知道Blob的含义以及如何使用它.显然其中有一些数据,我只是不知道如何访问或使用它.

When I try to echo the result in a php page to test it, nothing is returning. I'm just wondering what the Blob means and how to use it. It's obvious it's got some data in it, I just don't know how to access it or use it.

推荐答案

在phpmyadmin中,显示值的上方可以看到+ Options按钮,单击该按钮,然后选中Show BLOB内容,然后单击Go按钮.它将显示这些值.

In phpmyadmin above the values displaying you can see the +Options button Click on that then check the Show BLOB contents and click Go button.it will display the values.

您可以按照与访问客户ID相似的方式来使用ordered_items.

You can use the ordered_items in the similar way how you are accessing the customerid.

在php

foreach($resultSet as $row)
{
   $customerid = $row['customerid'];
   $ordered_items = $row['ordered_items'];
}

变量$ ordered_items包含phpmyadmin中显示的值.

The variable $ordered_items contains the values as it is displayed in phpmyadmin.

这篇关于mySQL groupconcat返回BLOB xxxB/Kib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆