Edited by Gast234, 07 January 2008 - 11:37 PM.
Formhandler , Hide Sql Error
#1
Posted 10 January 2006 - 11:55 AM
#2
Posted 10 January 2006 - 02:01 PM
post the code so we can see what is going on :betterwink:
#3
Posted 10 January 2006 - 02:07 PM
Edited by Gast234, 07 January 2008 - 11:37 PM.
#4
Posted 10 January 2006 - 02:22 PM
$bool = mysql_query("Insert into blablabla....");
if (!$bool) {
$message = "Error";
} else {
$message = "Success";
}
return $message;
or:
$output .=$message;
#5
Posted 10 January 2006 - 02:25 PM
Edited by Gast234, 07 January 2008 - 11:38 PM.
#6
Posted 10 January 2006 - 02:30 PM
pebosi, on Jan 10 2006, 10:07 AM, said:
i have a table with
- id (Primary key)
- email (unique)
- key
so if i add an entry with "mail@mail.de" and add this email again later, i got an error because of the "unique". But i need this field to be unique.
is there a way to get an message like this:
$bool = mysql_query("Insert into blablabla....");
if ($bool) {
$message = "Success";
} else {
$message = "Error";
}#7
Posted 10 January 2006 - 02:48 PM
Edited by Gast234, 07 January 2008 - 11:38 PM.
#8
Posted 10 January 2006 - 03:12 PM
pebosi, on Jan 10 2006, 10:48 AM, said:
is it able to hide the error?
to make it like this
$rs = $etomite->putIntTableRow($fields,$into);
if ($rs == 1) {
$msg = "Success";
} else {
$msg = "Error";
}
"mysql_query" was only an example....
Errors from almost any PHP function can be suppressed by adding the "@" character in front of the function call... The RTM release will accurately return false if the query result set is empty...
Edited by Ralph (rad14701), 10 January 2006 - 03:15 PM.
#9
Posted 10 January 2006 - 03:22 PM
Edited by Gast234, 07 January 2008 - 11:38 PM.
#10
Posted 10 January 2006 - 04:18 PM
pebosi, on Jan 10 2006, 11:22 AM, said:
Edited by Ralph (rad14701), 10 January 2006 - 04:20 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users










