MySQLi Extended Class

Results 1 to 6 of 6
  1. #1
    Lurking around Clawed is offline
    MemberRank
    Jun 2012 Join Date
    RaGEZONELocation
    785Posts

    MySQLi Extended Class

    Currently building a MySQLi Extended Class in PHP.

    GitHub
    https://github.com/Clawed/MySQLiExtended

    Features
    - Prepared Statements
    -- Insert - Complete
    -- Select - Not started, trying to work how to do it.
    -- Update - Complete
    -- Delete - Complete

    Feedback
    - This would be appreciated.
    Last edited by Clawed; 13-06-13 at 04:16 AM.


  2. #2
    Omega Ron is offline
    MemberRank
    Apr 2005 Join Date
    Location
    8,990Posts

    Re: MySQLi Extended Class

    Just a question, why aren't you putting the connect in __construct and the disconnect in __destruct? Makes more sense to have this handled automatically. I mean, the connection is closed regardless of calling mysql_close, just an observation.

  3. #3
    Lurking around Clawed is offline
    MemberRank
    Jun 2012 Join Date
    RaGEZONELocation
    785Posts

    Re: MySQLi Extended Class

    Yea i know, it's only like that because when i was building query builder, i kept getting connection errors, when i wasn't even intending of a connection.

    I will be changing it sometime later today.

  4. #4
    Omega Ron is offline
    MemberRank
    Apr 2005 Join Date
    Location
    8,990Posts

    Re: MySQLi Extended Class

    It would only connect when the class was called, and there isn't a reason for the class to be called unless a database connection is intended.

  5. #5
    Lurking around Clawed is offline
    MemberRank
    Jun 2012 Join Date
    RaGEZONELocation
    785Posts

    Re: MySQLi Extended Class

    Quote Originally Posted by Ron View Post
    It would only connect when the class was called, and there isn't a reason for the class to be called unless a database connection is intended.
    Yep, It'll only be called upon request, so it will only connect upon query & stuff.

  6. #6
    • ♠️​ ♦️ ♣️ ​♥️ • שเ๒єtгเ๒є is offline
    MemberRank
    Mar 2012 Join Date
    917Posts

    Re: MySQLi Extended Class

    You should include anti sql injection. This would be the main reason to use a class instead of plain SQL.



Advertisement