Add delete button to edit page ver PHPR 3.1? |
1/30/2008 8:48:24 PM |
PHPRunner General questions | |
K
ke5rs author
Hello, I think I create these pages using 3.1 |
|
J
|
Jane 1/31/2008 |
John,
function EditOnLoad() { global $conn; if ($_REQUEST["delete"]) { $str = "delete from TableName where RecordID=".$_REQUEST["delete"]; db_exec($str,$conn); ?><script> window.location='tablename_list.php'; </script><?php } } |
K
|
ke5rs author 2/11/2008 |
Thanks Jane, John, you can do the following:
|
![]() |
Alexey admin 2/12/2008 |
John, $str = "DELETE FROM worldsstv WHERE `call` ='".$_REQUEST["delete"]."'"; |
K
|
ke5rs author 2/12/2008 |
THank you Alexey, John, possibly "call" is a MySQL reserved word and can not be used as a field name in SQL queries. Try to enclose it in field wrappers: |