CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Best to update records listed in a grid

Print topic Send  topic

Author Message
Jer
Posted: 08/14/2001, 2:22 AM

Hi,

I'm using PHP4 and Templates. I'd like to know if this can be done in
CodeCharge without a lot of manually editing of code.

I'm the admin, and I'm listing ALL the records from a table. There is ONE
field that I want to be able to change.
i.e. I'd like to change the change the status field from 0 to 1 for multiple
records at once.

I added a checkbox at the end along with a hidden field. I added this to
Before Show in Events
$fldarticle_index ="<input type=hidden name=article
value=$fldarticle_index>$fldarticle_index";

I also added form tags using the header and footer areas of the page.

When I hit submit, I want it to change the value from 0 to 1 where the
article_id matches the article id(s) in the form.

Hopefully this is clear. All help appreciated. If there's an example of this
in the examples, I didn't see it, but I'd like to know about it.

Thanks.

Jer

Alexey Alexapolsky
Posted: 08/14/2001, 4:36 AM

Please see articles about updatable grids in gotocode.com
Tips and Articles

--
Alex


Jer <Jerirejnospam@removethis-hotmail.com> wrote in message
news:9laqkb$f6d$1@news.codecharge.com...
> Hi,
>
> I'm using PHP4 and Templates. I'd like to know if this can be done in
> CodeCharge without a lot of manually editing of code.
>
> I'm the admin, and I'm listing ALL the records from a table. There is ONE
> field that I want to be able to change.
> i.e. I'd like to change the change the status field from 0 to 1 for
multiple
> records at once.
>
> I added a checkbox at the end along with a hidden field. I added this to
> Before Show in Events
> $fldarticle_index ="<input type=hidden name=article
> value=$fldarticle_index>$fldarticle_index";
>
> I also added form tags using the header and footer areas of the page.
>
> When I hit submit, I want it to change the value from 0 to 1 where the
> article_id matches the article id(s) in the form.
>
> Hopefully this is clear. All help appreciated. If there's an example of
this
> in the examples, I didn't see it, but I'd like to know about it.
>
> Thanks.
>
> Jer
>
>

Jer
Posted: 08/14/2001, 5:54 PM

Hi Alex,

Thanks for the help.

The article isn't totally clear on a few things. i.e. where to put the code
in #5. I looked through the example and found out where it goes.

Can anybody help with translating this into PHP?

for each i in Request.QueryString
id = i
price = Request.QueryString(i)
price = replace(price,",",".")
if IsEmpty(id) or IsEmpty(price) or not IsNumeric(id) then exit for
cn.execute ("UPDATE items SET price=" & price & " WHERE item_id=" & id )
next

Or if an example already shows that, point me in the right direction.
Thanks,

Jer

"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:9lb2es$uff$1@news.codecharge.com...
> Please see articles about updatable grids in gotocode.com
> Tips and Articles
>
> --
> Alex
>
>
> Jer <Jerirejnospam@removethis-hotmail.com> wrote in message
>news:9laqkb$f6d$1@news.codecharge.com...
> > Hi,
> >
> > I'm using PHP4 and Templates. I'd like to know if this can be done in
> > CodeCharge without a lot of manually editing of code.
> >
> > I'm the admin, and I'm listing ALL the records from a table. There is
ONE
> > field that I want to be able to change.
> > i.e. I'd like to change the change the status field from 0 to 1 for
> multiple
> > records at once.
> >
> > I added a checkbox at the end along with a hidden field. I added this to
> > Before Show in Events
> > $fldarticle_index ="<input type=hidden name=article
> > value=$fldarticle_index>$fldarticle_index";
> >
> > I also added form tags using the header and footer areas of the page.
> >
> > When I hit submit, I want it to change the value from 0 to 1 where the
> > article_id matches the article id(s) in the form.
> >
> > Hopefully this is clear. All help appreciated. If there's an example of
> this
> > in the examples, I didn't see it, but I'd like to know about it.
> >
> > Thanks.
> >
> > Jer
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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