PHP OOP
5:55
Added: 2 years ago
From: kdottz
Views: 7,086
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • 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

  • I´ve Tested, Realy works! Thanks for help me!

  • please show some examples to insert data and select data from a table

  • @crohole

    var $insert

    $this->insert = mysql_query("INSERT INTO table (id,username,etc,etc) VALUE ($username,etc);

    Try something similar to that.

  • @W4iCorky Mty bad, I missed a few things out like ") lol

  • tes

  • Thanks. Can I know, which editor you used?

  • not bad

    I wish there was a language that combined the simplicity elegance and power of perl and the modern web functionality of PHP

    i guess its one or the other :(

  • Im so excited about OOP!

    Thank you so much!

  • $comment = new youtube;

    $comment->post('Object oriented programming is awesome..

    Never looking back to procedural.');

  • you include the php class file then use $database->functionname , the $database-> but whatever you named your instance is what youll use if that makes sense?

    so like new to create a new instance of the class database you'd do $whatuwannacallithere = new Database() ;[new database cos thats the name of the class] then you include it into the file and do $nameyoucalled it->function_you_want

  • Nice vid.

    Can you explain why you have "if(!$res) { die(mysql_error()); }" in it's own function conf_query(), instead of having it in the query() function?

  • thanks BMCVET :)

  • Hello friend;

    I would like to thank you for this tutorial by this huge lack of OOP that made the people who do not yet understand the use of classes. I am speaking particularly for little or no experience in OOP and videos like this really makes a huge difference to who is to begin programming in OOP.

    Thank you my friend!!

  • Eclipse For PHP :)

    and thanks for the comment hehe

  • Hey kdottz :)

    I think this is the best Audio less OO PHP Tutorial here in youtube, so please can you make more of these type of tutorials.

    For Example:

    1. Private Messaging Class

    2. Friend Invite Class

    3. Send E-mail Class

    4. User comment Class

    5 and just many others you can think of Bro :)

    and Tell Me if you have any where else i can view your tutorials :)

  • Awesome tutorial, saved me a lot of work redoing all time, OOP rocks!

    What editor are you using?

  • Nice, just what I needed.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more