今天上午刚同事发来的数据。做了一个: http://www.atool.org/12306.php 代码很简单,主要就是数据文件导入到数据库中就好了~不知道贴什么代码,就贴数据库查询的这个类吧~ 无 ?phprequire_once 'mysql.class.php';/** * 仅供参考 */class D12306Dao extends
今天上午刚同事发来的数据。做了一个:
<?php
require_once 'mysql.class.php';
/**
* 仅供参考
*/
class D12306Dao extends Mysql {
public function __construct() {
parent::__construct();
}
//邮箱
public function find_by_email($keyword) {
$sql = "select name from d12306 where email = '$keyword';";
return $this->exec_query($sql);
}
//身份证
public function find_by_uid($keyword) {
$sql = "select name from d12306 where uid = '$keyword';";
return $this->exec_query($sql);
}
//账号
public function find_by_userid($keyword) {
$sql = "select name from d12306 where userid = '$keyword';";
return $this->exec_query($sql);
}
public function insert($email, $userid, $name, $uid, $password, $phone) {
$sql = "insert into d12306(email, userid, name, uid, password, phone) values('$email', '$userid', '$name', '$uid', '$password', '$phone');";
return $this->exec_update($sql);
}
}
?>
铁路12306是一款由中铁程科技有限责任公司官方发行推出的购票订票软件。这款软件能够帮助用户随时随地查询火车高铁的信息,不管是想要购票还是退票改签都可以在这里进行操作,有需要的小伙伴快来保存下载体验吧!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号