CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> PHP

 Using checkbox to update fields

Print topic Send  topic

Author Message
Posted: 01/17/2004, 11:04 PM

Situation: mySQL weoth PHP 4.0 with Templates

- I have a table in mySQL ('persons') with a field called 'count' (amongst
other fields o.c.).
- I created a page with a grid of the table, and also with the field
'count' on it.
- Next I added a new control, a Checkbox. I place it in th egrid, sao that
each record will have a checkbox. I called the column: 'update'

What i want to achieve is that i have a button on the bottom of the record
list (th egrid), and when i click the button, all records where the checkbox
is checked, there the Count field is incremented by one.

Can anyone help me here? Im quite nerw to CCS, so dont be too complex :-)

Posted: 01/18/2004, 11:26 AM

Solved :-)
Posted: 01/20/2004, 9:09 AM

What was the solution, if you don't mind.

"Remy" <Remy@forum.codecharge> wrote in message
> Solved :-)
> ---------------------------------------
> Sent from YesSoftware forum

Posted: 01/22/2004, 12:19 PM

Well, noty that difficult it turned out :P

1- Create editable grid
2 - Set allow update to true
3 - then set all field you do NOT want to update/editable to readonly
4 - Add a new Checkbox
4 - Look for UpdateRow function
5 - Change the following code:



if (!$this->CheckBox_Add->Value)
{$this->ds->DefCount->SetValue($this->DefCount->GetValue() + 1);}

DefCount is the field i wanted to update; replace with your own field


Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.