易截截图软件、单文件、免安装、纯绿色、仅160KB

pdo 与mysql 的问题,请教高手?

程序在window下正常,然而在linux下,
register:
public function Insert($input) {

$time = time ();

$sql = "  INSERT INTO " . __DB_PREFIX__ . "member(
`email`,
`password`,
`secrecy_email`,
`lock`,
`add_time`,
`last_login_time`
)VALUES(
'" . $input ['name'] . "',
'" . md5 ( $input ['password'] ) . "',
'" . $input ['email'] . "',
0,
" . $time . ",
" . $time . "
)";

$stmt = $this->prepare ( $sql );

if (! $stmt->execute ()) {
throw new Exception ( join ( ' ', $stmt->errorInfo () ) );
}
}
这个方法好用,但是:
public function Account($name, $password) {

$sql="select member_id from gm_member where email='mygirl' and password='25d55ad283aa400af464c76d713c07ad'";
//$sql = "SELECT member_id from " . __DB_PREFIX__ . "member WHERE email='" . $name . "' AND password='" . $password . "'";
//$sth = $this->prepare ( $sql );
//$sth->execute ();
$stmt = $this->prepare ( $sql );
     


相关问答:

MYSQL安装失败

我以前安装了一次,后来卸载了,现在再安装的时候,提示错误:Error 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
可是我找 ......

MYSQL与Smarty的应用

在三十讲遇到这样一个问题就是运行代码时出现错误 Fatal error: Call to undefined method mysql::fetch_array() in D:\WWW\news\index.php on line 12
,我把mysql::fetch_array() 改成mysql::fetch_row() 又出现F ......

介绍Oracle和mysql的书 - Oracle / 非技术区

我对SQL SERVER和ACCESS比较熟,所以数据库的通用基础东西可以说都掌握的差不多了,我现在想要的就是以上两数据库的独特之处的介绍和应用介绍。
另外书最好对应最新版本 oracle是11g吧 10的也行;mysql是5.1吧
谢 ......

MYSQL 5.0,事务回滚的问题

建表:插记录
SQL code:

create table tablename (id int,RQ1 datetime,RQ2 datetime)
-- select * from tablename
insert into tablename
select 1,'2009-01-01 10:00:00','2009-01-02 11:00:00' union
......

Mysql 使用问题 - Java / Web 开发

我的Mysql 使用的时候 用dos建立的数据表 在dos中能显示出中文 
但是在 其他的可视页面 和网页中都显示乱码 如何解决?
在mysql控制台:show variables like 'char%';贴结果出来看看。

mysql命令行模式下: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号