Ivo
|
| Posted: 05/23/2003, 2:26 AM |
|
I found the article: Deletion of records in grid using checkboxes. I need something like that to delete records from a grid. Is there someone with a example for PHP?
Tnx!
Ivo
|
|
|
 |
Ivo
|
| Posted: 05/23/2003, 2:45 AM |
|
If there is not an example available, maybe this works?
I already use the updatable grid (http://www.gotocode.com/art.asp?art_id=50) and that works fine. I use it for my shoppingbasket. I want to change the script to make it possible that when the user gives the quantity: 0, the product will be removed from the shoppingbasket.
Now the script is:
$max = dLookUp("orderline", "max(orderline_id)", "1=1");
$min = dLookUp("orderline", "min(orderline_id)", "1=1");
for ($i=$min; $i<= $max; $i++)
{
//echo $i." is ".get_param("$i")."<br>";
$aantal = get_param("$i");
if ($aantal != "")
{
$aantal = str_replace(",", ".", $aantal);
$sSQLu = "UPDATE orderline SET aantal=" . $aantal . " WHERE orderline_id=".$i;
$db->query($sSQLu);
}
}
Tnx for helping,
Ivo
|
|
|
 |
Ivo
|
| Posted: 05/23/2003, 7:12 AM |
|
Who can help me with this "small" problem.
Thank you!!
Ivo
(student from holland)
|
|
|
 |
guest
|
| Posted: 05/26/2003, 5:27 AM |
|
|
|
|
 |
|