在数据库中搜索xml字符串 [英] search for xml string in a database

查看:80
本文介绍了在数据库中搜索xml字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要做的是以下查询



what im trying to do is the following query

select fontID from font where fontStyle="<?xml version="1.0" encoding="UTF-8"?>
<java version="1.7.0_17" class="java.beans.XMLDecoder">
 <null/>
</java>
"





i有两个列的表格字体fontID和fontStyle



填充记录。我需要知道的是如何获取fontID

i如上所述的select语句但是错误是对xml字符串的影响我怎么能这样做?



i have a table font with two columns fontID and fontStyle

filled with records. What i need to know is how to get the fontID
i did the select statement as above but an error is reffering to the xml string how could i do that?

推荐答案

[SQL] select fontID from font where fontStyle="<?xml version=\1.0" encoding="UTF-8"?>
<java version="1.7.0_17" class="java.beans.XMLDecoder">
 <null/>
</java>
"

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'encoding="UTF-8"?>
<java version="1.7.0_17" class="java.beans.XMLDecoder">
 <n' at line 1









这是错误





this is the error


这篇关于在数据库中搜索xml字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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