<?php $pcode = $_POST["pcode"]; include ("db.class.php"); $db = new db(); $sql = "select * from chinastates where ParentAreaCode = '{$pcode}'"; echo $db->jsonQuery($sql);
连上数据库,对象调用类,写完sql语句直接返回就欧克!!!
就是这么短!
效果图:
<?php $pcode = $_POST["pcode"]; include ("db.class.php"); $db = new db(); $sql = "select * from chinastates where ParentAreaCode = '{$pcode}'"; echo $db->jsonQuery($sql);
连上数据库,对象调用类,写完sql语句直接返回就欧克!!!
就是这么短!
效果图:
内容版权声明:除非注明,否则皆为本站原创文章。