PHP OOP
Uploader Comments (kdottz)
All Comments (20)
-
Where is the polymorphism and inheritance? Not really oop as it could be done with functional programming. Also, putting the disconnection in the __destructor might be easier to read in the code logic as you could simply delete the object. I don't like the die() in the method, either. .A better implementation would be to have objects for different tables inheriting from a base (possibly abstract) object or interface. The child obs would specialise their behaviour and properties.
-
its a nice one for the beginners.. however, you can make it way better with some constructors/destrucors and, interface and static methods. futhermore, there is no reason to leave all the objects public
-
Cute, but not efficiant.
private Driver, protected Connector extends Driver. public API extends Connector.
If you can look throgh thism u have saves you a hole lot of time an money.
(Driver handles DB and __construct. Connector handles DB-calls. API handles application and thereby I/O. !Is instantitated!)
-
OMG this code is beautiful! Thank you
-
@W4iCorky Mty bad, I missed a few things out like ") lol
-
var $insert
$this->insert = mysql_query("INSERT INTO table (id,username,etc,etc) VALUE ($username,etc);
Try something similar to that.
-
I´ve Tested, Realy works! Thanks for help me!
-
please show some examples to insert data and select data from a table
-
tes
-
Thanks. Can I know, which editor you used?
thanks BMCVET :)
kdottz 2 years ago
Eclipse For PHP :)
and thanks for the comment hehe
kdottz 2 years ago