dbh = new PDO($dsn, $user, $password,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8';"));
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
}
public function sRow($sql){
$sth = $this->dbh->prepare($sql);
$sth->execute();
$ret = $sth->fetchAll(PDO::FETCH_ASSOC);
return $ret[0];
}
public function sRows($sql){
$sth = $this->dbh->prepare($sql);
$sth->execute();
return $sth->fetchAll(PDO::FETCH_ASSOC);
}
public function dbInsert($sql){
$sth = $this->dbh;
$count = $sth->exec($sql);
if($count){
return true;
}else {
return false;
}
}
//insert update
public function dbIUD($sql){
$sth = $this->dbh;
$count = $sth->exec($sql);
if($count){
return true;
}else {
return false;
}
}
}
一款非常包包、衣服、鞋子类网站,页面干净清洁、一目了然,mttshop打造精致、简单、易用、免费的商城。 系统要求:IIS5.1以后,必须安装.net 3.5 安装步骤: 1、下载完成后,直接解压文件mttshop.rar 2、附加数据库:解压后的可以找一个叫db的文件夹,解压后直接附加就可以,支持SQL 2000、2005、2008 3、配置web.config文件,找到key=&qu










