Integrate aspects of OOP into MacCMS
Bug #558955 reported by
Julian Lam
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MacCMS |
In Progress
|
Wishlist
|
Julian Lam |
Bug Description
OOP has some interesting applications/
Most advantages aren't big enough to consider implementing, except one: SQL Querying!
Some pages have scripts calling the same procedure over and over again. Wasted code... you could write:
$num_users = $sql->count_
As opposed to:
$num_users = mysql_fetch_
$num_users = $num_users[0];
Cleaner code, indeed.
To post a comment you must log in.
Actually, I used that wrong...
An object is made for every SQL access (or not, that sounds cumbersome), or every page, and queries are directed to it.
Technically, every query should be its own object...