drq9991 2011-07-16 20:27
浏览 23
已采纳

MYSQL获取xml字符串,无需转换/解释

Simple requirement: I want to store a flat unchanged XML strings into a MySQL-DB and then fetch the string itself via php with the tags (i.e. <tag>1234</tag>).

Problem: When I fetch the string, I get the values not the entire XML string.

I store <tag>1243</tag> (done via PHPmyAdmin) then I fetch (see code below) and echo the result I get 1234 not <tag>1234</tag>.

$query = "SELECT * FROM  " . $my_table_with_flat_xml_string;
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
  $xml_flat_file_with_the_tags_please = $row[0];
  echo " ( " . $tags. ")";
}

Help!

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥35 基于python的有ssl加密传输的socket聊天室
  • ¥15 数码管亮度控制器设计
  • ¥15 kafka客户端跨网段访问,看日志提示连接的还剩内网地址,且访问不通
  • ¥15 关于c语言代码的问题
  • ¥15 c51单片机控制步进电机
  • ¥20 Visual studio无法检测到设备
  • ¥30 vue 页面窗口放大或者缩小元素会变化
  • ¥15 questasim仿真报错
  • ¥15 寻找电脑攻防的导师,有问题请教一下。
  • ¥20 微信同是win11,我的电脑安装不了pageoffice,一直无法打开