MYSQL转换JSON

http://51strive.com/

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>在线 Mysql 转换 json串</title>
</head>
<body>
<H1><div style="text-align:center;">在线 Mysql 转换 json串</div></H1>
<h2><font color="red">2016.5.16 修复xmpphp-0.1rc2-r77支持php7</font></h2>
<a href="https://github.com/onefishum/xmpphp-for-php7" target="_blank">xmpphp-0.1rc2-r77 for php7</a><P>

Mysql 输出格式:<br>

mysql> select * from demo_test;<br>
<pre>
+-----+--------------+------+------+------+
| c1 | c2 | c3 | c4 | c5 |
+-----+--------------+------+------+------+
| a11 | 123456789 | 10 | 1 | 0 |
| AA | HELLO, HELLO | 8 | 0 | 0 |
+-----+--------------+------+------+------+
</pre>
<P>
<H2><font color="red">注:拷贝表格部分</font><br></h2>
<div style="courier new">
<form name='msyql2json' action="" method="post" accept-charset="utf-8">
<input type="submit" name="submit" value="提交" onclick="checkValid()" >
<P>
<textarea id="strData" name='text' style="width:800px;height:320px;">
</textarea><br>
</div>
</form>
<p>
Json串:<p>
null<div style="display:none"> <a href="http://www.art-zys.com"></a></div>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e8bbc4c2aa86f142f8c62acd306e2497";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>

<script language="javascript">
function checkValid()
{
var tex = document.getElementById("strData");

if(tex.value.length > 16384)
{
alert("输入不超过16384个字符!已经超出"+Number(tex.value.length-16384));
return false;
}
return true;
}
</script>
</body>
</html>

posted @ 2016-09-19 11:03  原谅我这一生放荡不羁  阅读(11543)  评论(0编辑  收藏  举报