webinaction.co.uk How to insert, update and delete database records in a MySQL database to which we have connected using a PDO connection.
source
webinaction.co.uk How to insert, update and delete database records in a MySQL database to which we have connected using a PDO connection.
source
31 responses to “MySQL PDO Tutorial Lesson 8 – Insert, update and delete records”
how to delete multipale record using chenckbox
Thank you Sir Richard!
Do you still using this ugly text editor? It seems very powerful, but it's kind of hard to distinguish and see the content. It reminds me on Notepad++: powerful, but kind of retro and hard to distinguish. Hopefully, in the future videos — for which I'm really looking forward 😉 — you will use something nicer, like Sublime or Atom. They're really make it easier to follow. Anyway, those lessions were very, very helpfull! Thanks! 🙂
thank you! for your efforts !! 🙂 Highly appreciated!
simple clean awesome video. thanks very much sir for such great tut…
:/ mine didnt work the insertion of records didnt work
Thanks this was brilliant, I watched a few others videos but what I liked about yours it that it is put very clearly, easy to understand and no extra stuff that is not needed. Thanks so much this helped me better understand this. Just brilliant.
very well.. thank you
awesome lectures… learnt so many things….
I have one difficulty hope you will give some help
how to securely make connection to database. like in the video you have shown very basic syntax so how to make secure the username and password in the statement which is opening connection to database ????
Thank you so much!
could you upload an tutorial of application of pdo using live html form
+Richard Stibbard
Quality Informations and Well presented with some fun in between.
BRAVO !!!
Very nice and quick tutorial. Keep it up.
Thank you for creating a great PDO series. It has been a tremendous help. -John from NY
Thanks for the clear tutorials. Helped a lot!
Perfect Tutorial. Comprehensive and clear voice. Thank You.
Excellent Series. Excellent teaching. Subscribed.
Great videos, right on point!
Thank you for taking the time and effort to make them.
Simply awesome!!
I got the example from your tutorial regarding update but when I have gone to use on my own project not quite the same results. I am updating a password field for someone who has lost their password. I have hashed the new password then used substr to get to 7 chars, I then stored in variable which I know raises eyebrows regarding security but then I have
$stmt = $pdo->prepare("UPDATE users set password='$pass' where username='$user' LIMIT 1");
Now my issue is I have all the data in an assoc array from the 1st prep statement which is validating whether account exists, in assoc array. Can the 2nd prepared statement still use that array? If it can't I need to rethink how I go about it.
I have done a var_dump on $user, the original prep statement but keeping security in mind, I know using the variables is 1 problem but then a second comes in when I try to access the array within the prep statement?
Thanks
Richard, if in your delete example you had 2 or more people with the same names so you wanted to only delete the appropriate record how would you write the query. I have had a go but it does not delete the record.
My code
$stmt = $db->prepare("DELETE FROM names WHERE first = :first, last = :last, postcode = :postcode");
$stmt->bindValue(':first', 'Indira');
$stmt->bindValue(':last', 'Jones');
$stmt->bindValue(':postcode', 'WV4 2TW');
$stmt->execute();
Thanks
Great set of tutorials, delivered at just the right speed and very informative. Thanks.
Thank you for the videos, a big hug from Brazil.
Thank you for this PDO Tutorial, it helped me a lot.
Thanks a bunch for these videos, they were very helpful!
Just awesome tutorial. I learned a lot from this series. Thank you very much Dr.
Now I can implemented into my php codes 🙂
yeah but… don't you need to declare using $_POST for the variables from the html form? what happened with that?
Simple, clear , concise… this just one of the best PDO tutorial out there !!! Thanks Sir
Hey Dr. Richard, I enjoyed the entire series. I can now declare myself a PDO Ninja (hahahaaa…) the credit GOES BACK TO YOU SIR!
you have really helped me get somewhere using PDO nice and thanks a lot
Outstanding! Teachers teach. You are a teacher. Thank you! I hope to see more.