How To Query A Database Using PDO PHP | OOP PHP Tutorial | Learn OOP PHP | PDO Tutorial. In this PHP tutorial you will learn how to get data from a …



  1. Beware! Return will actually stop your function from running. So if you have multiple entries in your database table, and you wanna spit all of them out, you should go with echo inside the function and just call the function from outside.

  2. Please reply my question MMTUTS,
    I used 2 different methods to insert data. First method was OOP and second method was PDO.
    In OOP method I was able to use mysqli_real_escape_string() and after using it I tried to insert a javascript function!
    This is the result:
    But I could not use mysqli_real_escape_string in PDO (As i don't need to use it!!!) but after inserting same javascript function,
    I received alert. And this is my javascript function:
    <script type="text/javascript">

    This is not safe at all and why i cannot use mysqli_real_escape_string() in PDO if I don't need to that then what method should I use? ((I used prepared_statement)

  3. Hi! Great video! Soo, can you make a video about using AJAX and JSON in oop? Something where you get data from DB (JSON data) using oop php and show this data by jQuery using ajax? 🙂 Your videos are great!


Please enter your comment!
Please enter your name here