User Tools

Site Tools


pdo:update_statements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pdo:update_statements [2016/10/14 08:55] – created peterpdo:update_statements [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 7: Line 7:
 </code> </code>
  
 +
 +===== Prepared Statements =====
 +
 +<code php>
 +<?php
 +$stmt = $db->prepare("UPDATE table SET name=? WHERE id=?");
 +$stmt->execute(array($name, $id));
 +$affected_rows = $stmt->rowCount();
 +</code>
pdo/update_statements.1476435300.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki