
Originally Posted by
azaidi
Hmm, browsing "WeirdCMS"..
Why is your base class User, then you extend it with UserManager (still seems OK although I would simply make an instance of User for the current user) and then you extend the UserManager with a MySQL class..
Shouldn't you just use the MySQL as the base class or make a global mysql connection instead of like that? Is there any reason for doing that? I'm asking because you have much more PHP experience and it probably has a reason but it looks very strange to me. Also putting 2 classes in one file is very annoying to find which class is in which file
And ehm most coders don't do MySQL queries in PHP like this, but prefer to do it like this:
'UPDATE `users` SET `'.$type.'` = "'.$value.'" WHERE `id` = "'.$id.'" LIMIT 1'
"UPDATE users SET $type = '$value' WHERE id = '$id' LIMIT 1"
I prefer to do the second one simply because it reads a lot easier