deleting multiple data from sql using .tpl files
Posted: Mon Sep 25, 2006 3:39 pm
feyd | Please use
and it's working perfectly but it can delete just one record. i want to delete multiple data using checkboxes. actually i already placed them in table where records are being displayed but the don't work...
can someone halp me? i want to have same code but with ability to delete multiple data
thnx a lot
texxarse
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i've got a little problem...
i'm actually new in php coding and i can't get some things, some things i can't understand. i'm begging for help for the first time...
i got the code which displays records from database(MySQL) like:Code: Select all
// displaying records
for ($i = 0; $i < count($this->mMessage); $i++)
$this->mMessage[$i]['onclick'] = "index.php?MailAccountID=2&SentMessageID=" . $this->mMessage[$i]['sent_id'];
// end of displaying
// deleting data
if(isset($_POST['Delete']))
{
$query_string = "DELETE FROM sent WHERE sent_id = '$this->mSelectedMessage' AND customer_id = '$this->mCustomer' LIMIT 1";
$result = @mysql_query($query_string);
header("Location: index.php?MailAccountID=2");
exit;
}
// end of this codecan someone halp me? i want to have same code but with ability to delete multiple data
thnx a lot
texxarse
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]