|
|
 |
Re: FN-FORUM: PHP version of ASP datagrid?
date posted 21st May 2007 13:06
On 21 May 2007, at 12:48 pm, Duncan Glendinning wrote:
> If I can get around this, then it is doable.
> I am wondering whether I also pass the submitted form the query that
> displayed all the results, and then get a loop to work through all the
> results again, checking to see if the checkbox (whose name is the
> current id of the record I am looking at ) is set to 1 for example,
> and then construct the query that way.
>
Duncan,
Further to my previous post, I just dig out the function I used for the
remove checkbox. It might save you some time...
if (is_array($remove)){
// if any of the remove boxes have been checked
// step through the values and delete from the quotes_parts table
reset ($remove); // reset the array
while (list ($key, $value) = each ($remove)) {
// update the quotes_parts table
$sql4 = "DELETE FROM quotes_parts WHERE quote_id='$quote_id' AND
id='$key'";
if(!$result4 = mysql_query($sql4)){
$message = "Error. The quotes_parts table was not updated.";
return $message;
}
}
}
Best regards,
Ray
------------------------------
Ray McGinty Information Design
Specialising in web application development,
e-commerce and design for print.
http://www.rmid.co.uk
Listed on the Business Link North East England Service Provider Register
|
 |
|