Jump to content

Search the Community

Showing results for tags 'subclass'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Is it considered incorrect practice to declare privacy modifiers on variable/properties of subclasses? for example: class SubClass { var $property = 'notice there is no private, public, or protected keyword here'; }
  2. I am using parent::__construct() in almost every classes to connect Mysql DB. Example class class secondClass extends dbconnect { public function __construct() { parent::__construct(); dbconnect class class dbconnect { private $mysqli_handler; public function __construct() { try { mysqli_report(MYSQLI_REPORT_STRICT); $this->mysqli_handler = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DBNAME); } catch (mysqli_sql_exception $e) { throw new Exception('Error: Could not make a database link using ' . DB_USERNAME . '@' . DB_HOSTNAME . '!'); } if ($this->mysqli_handler->connect_error) { trigger_error('Error: Could not make a database link (' . $this->mysqli_handler->connect_errno . ') ' . $this->mysqli_handler->connect_error); } $this->mysqli_handler->query("SET NAMES 'utf8'"); $this->mysqli_handler->query("SET CHARACTER SET utf8"); $this->mysqli_handler->query("SET CHARACTER_SET_CONNECTION=utf8"); $this->mysqli_handler->query("SET SQL_MODE = ''"); $this->mysqli_handler->query("SET time_zone = 'Asia/Kolkata'"); } Is this create multiple instance of mysql dbconnection? I am frequently getting mysql connection error on my shared hosting. If so how to avoid? I am using PHP Version 7.4.16, some detailed explanation will be useful for me as I am using like this for many projects. Thank you for your time. Prabakaran
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.