Integrate aspects of OOP into MacCMS

Bug #558955 reported by Julian Lam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MacCMS
In Progress
Wishlist
Julian Lam

Bug Description

OOP has some interesting applications/benefits - some of which are achieved through procedural programming.

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_rows([query]);

As opposed to:

$num_users = mysql_fetch_row(mysql_query("[query]"));
$num_users = $num_users[0];

Cleaner code, indeed.

Revision history for this message
Julian Lam (julian-lam) wrote :

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...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.