"<br />
<b>Warning</b>: mysqli::mysqli() [<a href='mysqli.mysqli'>mysqli.mysqli</a>]: (28000/1045): Access denied for user '<myUser>'@'<myServer>' (using password: YES) in <b><myApp>.php</b> on line <b>100</b><br />
An error occured : Connection failed:
"
I only want the last line to appear in my returned message "An error occured : Connection failed:
".
No matter what I have tried I cannot stop the first portion of the message from being suppressed.
Here is my code
Expand|Select|Wrap|Line Numbers
- <?php
- /*-- my calling app --*/
- try
- {
- //open connection to database
- include("db.php");
- $fieldList = $db->getFieldList("<myTable>");
- } //end try
- catch (exception $e)
- {
- echo 'An error occured : ' .$e->getMessage();
- }
- ?>
- <?php
- /*-- this is my db.php app included above --*/
- class dbcnx extends mysqli
- {
- function getFieldList($t1)
- {
- ....some code here....
- return $aFieldList;
- }
- }
- /* Connect to database */
- $db = new dbcnx("localhost", "User", "Wrong Password", "dataBase");
- /* check connection */
- if (mysqli_connect_errno()) {
- throw new Exception("Connection failed: ");
- exit();
- }
- ?>
help!!! please