Right now, I'm familiar with the mysqli procedure (which is so much more amazing than the old mysql). For example, I use mysqli_real_escape_string() quite frequently. However, I seem to be unable to exact a bound param query.
$stmt=mysqli_prepare($link, "SELECT `qty` FROM `usr_inv` WHERE `inv_id`=? AND `usr_id`=?"); mysqli_stmt_bind_param($stmt, "ii", $inv_id, $usr_id); mysqli_stmt_execute($stmt);
What would this look like with PDO? How would PDO be implemented correctly? Say I want to connect to the database ONCE and disconnect when I'm done with everything. How would that work? Could someone give me a quick run-down on how that would be implemented?
This post has been edited by the1corrupted: 23 April 2012 - 07:07 PM