The current use is Die ("SQL statement error");
But do not want to let users see something, what should be done?
Reply to discussion (solution)
Header ("Location: Destination"); exit ();
Header ("Location: Destination"); exit ();
Jump statements I know, but how do I get to this sentence?
For example, the current statement is mysql_query ($sql) or Die ("SQL Error");
I think you will not ask this question if you have studied object-oriented.
All SQL is executed in so many method classes, Try,catch catch errors. Jump processing
$result = mysql_query ($sql), if (! $result) { header ("Location: Destination"); Exit ();}
The main is the error when you do not want to let users see
Then automatically jump to a specified page and output on this page, there is no difference
As with the error message, the user is now in front of
The main is the error when you do not want to let users see
Then automatically jump to a specified page and output on this page, there is no difference
As with the error message, the user is now in front of
You understand that very correctly.
I understand the right thing, and that's you. The demand description is wrong.
I understand the right thing, and that's you. The demand description is wrong.
What's your solution?
Logging errors to the log
Continue to execute the program, but need to determine the validity of the data
But as you can see in the case of your example, it's not necessary to do that.
SQL instruction errors occur only during the debugging phase, and SQL syntax errors do not occur at the formal runtime
Unless you allow users to submit SQL instructions, you should also tell the submitter that the SQL instructions are wrong
Thanks to two moderators for their responses, each of them received