![]() |
Database and classes
My question is how can classes help database ? I mean in the form of insert, update, delete and etc.
|
Basically can help you cut down on repetitive code. I'd show an example, but about to go out.
will add more later EDIT: Lets say you wanted to update your database, i make a class that includes an 'update' function. So below i have the query that is going to be sent to the function PHP Code:
Next, the function: PHP Code:
I know this is only brief, but i hope that helps you a little, and im sure their a more advanced PHP coders here that could show an even better way of doing it, as im certainly not advanced lol. |
| All times are GMT. The time now is 09:13 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0