正文 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