In the last chapter, I showed you how to break the code up into easily reusable functions. This has several advantages:
In this chapter, I’ll take this a step further and show you how to make a function that could be used for any database table, and then show you how object-oriented programming can simplify this task even further.
updateJoke($pdo, 1, 'Why did the programmer quit his job? He didn\'t get arrays', 1);
To run this function, all of the arguments for the function must be provided:
What if you just wanted to update the ...