将 BLOB 连接到字符串
我想知道是否可以将包含图片信息的 BLOB 连接到包含文本数据的字符串?我想不是,但我希望是!
让我试着澄清一下我的问题。我试图从我的表格中提取除该用户照片之外的用户信息并将其呈现给用户。我希望所有这些信息都可以作为 echo 语句返回给用户,然后我可以使用 jquery 异步获取它。我希望我必须进行两次 ajax 调用。看来我可能不得不这样做。
I am trying to figure out if I can conatanate a BLOB containing picture information to a string, containing text data? I am thinking no, but I am hoping yes!
Let me try and clear up my question a little bit. I am attempting to pull user information in addition to a photograph of that user out of my tables and present them to the user. I was hoping all of that information could be tossed back out to the user as an echo statement and I could then use jquery to pick it up asynchronously. I was hoping I would have to make two ajax calls. I may have to it seems.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于 MySQL 文本数据以零结尾。
因此 blob 中的第一个
\0
将破坏字符串。您将需要使用
quote
来转义 blob 数据。不能 100% 确定这会起作用。
The problem is that MySQL text data is zero terminated.
So the first
\0
in the blob will break the string.You will need to use
quote
to escape the blob data.Not 100% sure this will work.