check.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- $t_PAR=$_GET[par];
- $t_FUN=$_GET[fun];
- echo check_shdsn($t_PAR);
- function check_shdsn($sn){ //返回 0 可以使用 1 己存在 3 不能为空
- if(empty($sn)){return 3;exit;}
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $m_tablename="shdmast";
- $sSql = "select * from $m_tablename where SHMID = '$sn'";
- $rs = phpmkr_query($sSql,$conn) or die("a Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- //return $sn;
- if (phpmkr_num_rows($rs) <= 0){
- return 0;
- } else { return 1;}
- }
- ?>