update sql statements to phplib pdo