I would like to know how to use the common mysql_* stuff. I don't take to make SO a mess and make a question for each one, so I just put up this question with a small list:
- num_rows
- fetch_array
- set_charset
- fetch_row
This is the functions you use to normal mysql_* queries, what are the PDO´s functions equals to these?
And how can you INSERT INTO, UPDATE and DELETE
The only thing I know and tested right now is connect to the db + selecting like this:
$conn = new PDO("mysql:host=$host;dbname=$db",$user,$pass);
$sql = "SELECT id FROM users";
$q = $conn->query($sql) or die("failed!");
What I expect for an answer is either links to each function and attributes
(num_rows, fetch_array, insert into, update, etc..) or direct answers to them.