How to Abstract Your MySQL Database Class




In this lesson, you’ll learn how to abstract your database functions into an re-usable database class you can use again and again. Learning this one simple skill …

Original source


5 responses to “How to Abstract Your MySQL Database Class”

  1. thanks for good video.

    I got problem 45tf line of your code where you have "call_user_func_array( array($stmt, 'bind_param'), $this->ref_values($values));"

    it return error as follows:
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in C:xampphtdocsecindex.php on line 45

    what I found $values has a value as follows:
    Array ( [0] => ss [1] => Title_text [2] => Content_text )

    I can not figure out why the [0] element has "ss" value corresponding to format.
    in the meantime print_r($data) line returns correct values Array ( [post_title] => Title_text [post_content] => Content_text ). any help is approciated.

  2. Could you make a video on how to version control your database? I am using Git to version control all the files and so on, however the database is a whole different story and I'm still figuring it out.

Leave a Reply