Jump to content


Photo

How about mysql_error, error reporting, and what users see?


  • Please log in to reply
2 replies to this topic

#1 mmosel

mmosel
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts

Posted 02 July 2006 - 09:52 PM

Hi all,

I have a couple of error related questions. First off, I have a function that I run when I need a special error display. Currently, if there is a mysql_error, I run my function with the mysql_error() inside the function which displays it on a error page. 1. Is it bad to show the user a mysql_error() notice? 2. If I have error_reporting off, will mysql_error() still show up? 3. Is there an easy php function to add content or errors to the error log, or do I have to write something custom?

Thanks for all your help!

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 02 July 2006 - 09:58 PM

1/ yes.
2/ yes.
3/ You could simply change error_reporting(). Again though, this wont effect any calls to mysql_error().

#3 mmosel

mmosel
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts

Posted 02 July 2006 - 10:00 PM

Ok, thank you. I have some work to do then.

Question: Does a mysql_error() NOT throw a PHP error?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users