The hosting service that I use does somthing so that warning messages are ouput with my php. What up with that and how do I turn them off?
what type of code are you running that is spitting out errors, you may be able to just use an @ before your function to suppress like
@()
@copy()
etc....
I was using mysql queries
I get warnings like Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ... on line ...
Is there something in the code I could do to turn the warnings off or do I just need to code better.
generally when you get that error, there is something wrong with your query, but if everthing is being inserted into the database correctly to suppress the error, simply put an @ in front of the function
@mysql_num_rows
Thanks! That is very helpful. Will I have to do that befor on every query. My testing server at home doesn't spit out warnings.
if the @ works, you can put it in front of any php function to suppress the errors
most likely the host has error reporting on and they probably won't turn it off // its in php.ini
so the easiest thing is to use the @
Or insert an [man]error_reporting[/man] line at the top of the offending script(s).
Better still, as stolzyboy mentioned, find out why the warnings are happening and fix it 🙂
For good programming habbits, code under E_ALL: error_reporting(E_ALL);
This mentions all errors, warnings, etc.
You guys gave some good advice. Thank you. I was able to resolve the problem. I was able to fix the problem.