hi
mysql should change a message, but it doesnt. I does delete the message if i have changed the " trash='0' " to " trash='1' " manually. But it should be done by script.
Please take a look. I just cant find the wrong code.
PS. the error is not #__cpms_inbox and pls take also a look at http://www.frihost.com/forums/vt-40869.html (an other error)
OMG it just had to be "UPDATE #__cpms_inbox SET trash='1' WHERE id='$message_id'"
And ive been trying things for years. But it works now
Last edited by devroom on Thu Jun 15, 2006 10:35 am; edited 1 time in total
mysql should change a message, but it doesnt. I does delete the message if i have changed the " trash='0' " to " trash='1' " manually. But it should be done by script.
Please take a look. I just cant find the wrong code.
PS. the error is not #__cpms_inbox and pls take also a look at http://www.frihost.com/forums/vt-40869.html (an other error)
| Code: |
| $deletemessage = "SELECT id,trash FROM #__cpms_inbox WHERE id='$message_id' and username='$my->username'";
$database->setQuery($deletemessage); $result = $database->query(); $field = mysql_fetch_assoc($result); if (empty($field['id'])) { mosRedirect($base_url."&func=msg&id=err1"); exit;} if ($field['trash']==0) { $totrash = "UPDATE FROM #__cpms_inbox SET trash='1' WHERE id='$message_id'"; $database->setQuery($totrash); $changed = $database->query(); mosRedirect($base_url."&func=msg&id=del1"); } else { $delete = "DELETE FROM #__cpms_inbox WHERE id='$message_id'"; $database->setQuery($delete); $deleted = $database->query(); mosRedirect($base_url."&func=msg&id=del2"); } |
And ive been trying things for years. But it works now
Last edited by devroom on Thu Jun 15, 2006 10:35 am; edited 1 time in total
