Jump to content

how to hide Table 'table_name' doesn't exist message?


$php_mysql$

Recommended Posts

sounds like you have display_errors set to on..?

on a live server, you will want this setting off... and can even control where the error messages are sent so only you have access to them..

 

just checked php.ini and yes it says on

 

display_errors

;  Default Value: On

;  Development Value: On

;  Production Value: Off

 

so i tried to turn it off

 

display_errors

;  Default Value: Off

;  Development Value: Off

;  Production Value: Off

 

but still it shows? i even restarted my wamp server. but this is on my laptop how will i control it on shared webhosting?

Link to comment
Share on other sites

this is my coding for db connect

 

if(!$conn = mysql_connect($host, $user, $password)) {
            die("Could't connect to database server.....".mysql_error());
        } else {
            mysql_select_db($database, $conn) or die(mysql_error());
            return $conn;
        }
    }

Link to comment
Share on other sites

tried this

 

if(!$conn = mysql_connect($host, $user, $password)) {
            trigger_error("Could't connect to database server.....".mysql_error($conn), E_USER_ERROR);
        } else {
            mysql_select_db($database, $conn) or trigger_error(mysql_error($conn), E_USER_ERROR);
            return $conn;
        }
    }

still error shows any idea? guess im doing it wrong?

Link to comment
Share on other sites

sounds like you have display_errors set to on..?

on a live server, you will want this setting off... and can even control where the error messages are sent so only you have access to them..

 

just checked php.ini and yes it says on

 

display_errors

;  Default Value: On

;  Development Value: On

;  Production Value: Off

 

so i tried to turn it off

 

display_errors

;  Default Value: Off

;  Development Value: Off

;  Production Value: Off

 

but still it shows? i even restarted my wamp server. but this is on my laptop how will i control it on shared webhosting?

 

You need to scroll further down the php.ini file, display_errors is set in the ERROR HANDLING section.  What you are looking at is the Quick Reference section.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.