Jump to content

Hide mysql con error.


Kristian_C

Recommended Posts

Hey people, everybody happy? :)just wanted to know if there was a way to not display mysql connection error's?like :Insted of :Warning: mysql_connect(): Access denied for user '^^^'@'^^^^^^' (using password: YES) in /home/content/u/n/i/^^^^/^^^^/^^^^/^^^^/^^^^ on line ^^^^Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/u/n/i/^^^^/^^^^/^^^^/^^^^/^^^^ on line ^^^^Warning: mysql_select_db(): A link to the server could not be established in /home/content/u/n/i/^^^^/^^^^/^^^^/^^^^/^^^^ on line ^^^^to be displayd, this will insted :Hello, a system error has showd up, pleace wait a few hours for us to fix the problem.is it possible?-------------Kristian_C

Link to comment
Share on other sites

You can add "@" like this

@$con = mysql_connect("localhost","username","password");if (!$con) {	die('Could not connect: ' . mysql_error());}@mysql_select_db("database_name", $con);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...