note 117706 added to class.mysqli-sql-exception

From: Date: Sat, 25 Jul 2015 11:12:02 +0000
Subject: note 117706 added to class.mysqli-sql-exception
Groups: php.notes 
Request: Send a blank email to php-notes+get-203183@lists.php.net to get a copy of this message
use this format its efficient, good and object oriented #constants.php <?php // Database Constants define("DB_SERVER", "localhost"); define("DB_USER", "root"); define("DB_PASS", ""); define("DB_NAME", ""); ?> #connection.php <?php session_start(); require("constants.php"); // 1. Create a database connection $link = new mysqli(DB_SERVER, DB_USER, DB_PASS); if (!$link) { die("Database connection failed: " . mysql_error()); } // 2. Select a database to use $db_select = $link->select_db(DB_NAME); if (!$db_select) { die("Database selection failed: " . mysql_error()); } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 188.247.72.97 ---- Manual Page -- http://php.net/manual/en/class.mysqli-sql-exception.php Edit -- https://master.php.net/note/edit/117706 Del: integrated -- https://master.php.net/note/delete/117706/integrated Del: useless -- https://master.php.net/note/delete/117706/useless Del: bad code -- https://master.php.net/note/delete/117706/bad+code Del: spam -- https://master.php.net/note/delete/117706/spam Del: non-english -- https://master.php.net/note/delete/117706/non-english Del: in docs -- https://master.php.net/note/delete/117706/in+docs Del: other reasons-- https://master.php.net/note/delete/117706 Reject -- https://master.php.net/note/reject/117706 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203183) next »