SQL
4 行
$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();//如果不存在返回的是空的数组,如果存在就是用户名+密码
SQL
3 行
$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']));