note 91016 added to language.operators.errorcontrol

From: Date: Thu, 21 May 2009 08:05:22 +0000
Subject: note 91016 added to language.operators.errorcontrol
Groups: php.notes 
Request: Send a blank email to php-notes+get-155818@lists.php.net to get a copy of this message
RE: gerrywastaken As you probably know, there are some error-causing conditions that you just can't test for. For instance, mysql_connect() outputs an error if an attempt to connect to a MySQL database fails. How can you test for the condition that typically causes this, i.e., incorrect username and/or password? The only way to know if the username and password are incorrect is to "ask" the database by trying to connect to it, and if they're incorrect, some output will be generated that you may not want. You may feel confident that the username and password supplied are correct because they've always worked as long as they've been constant in the code. But what if the password was recently changed in the database? Hence, error suppression is the way to go in such situations. ---- Server IP: 69.147.83.197 Probable Submitter: 75.82.195.12 ---- Manual Page -- http://www.php.net/manual/en/language.operators.errorcontrol.php Edit -- https://master.php.net/note/edit/91016 Del: integrated -- https://master.php.net/note/delete/91016/integrated Del: useless -- https://master.php.net/note/delete/91016/useless Del: bad code -- https://master.php.net/note/delete/91016/bad+code Del: spam -- https://master.php.net/note/delete/91016/spam Del: non-english -- https://master.php.net/note/delete/91016/non-english Del: in docs -- https://master.php.net/note/delete/91016/in+docs Del: other reasons-- https://master.php.net/note/delete/91016 Reject -- https://master.php.net/note/reject/91016 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#155818) next »