php pdo操作数据库
发布时间:2015-10-30, 15:58:10 分类:PHP | 编辑 off 网址 | 辅助
正文 494字数 104,430阅读
$s_sql = select username,password from t_table where username=? and password=?;
$sth = $dbh->prepare($s_sql);
$result = $sth->execute(array($username,$password));
$result = $sth->fetchAll();//如果不存在返回的是空的数组,如果存在就是用户名+密码
Run code
Cut to clipboard
$sql_update = “update catalog_eav_attribute set attribute_id = ? where attribute_id = ? “;
$sthupdate = $dbh1->prepare($sql_update);
$aaa=$sthupdate->execute(array($col['attribute_id'],$tmp['attribute_id']));
Run code
Cut to clipboard
(支付宝)给作者钱财以资鼓励 (微信)→
暂无评论 »