CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Custom update in multi-tables query editable grid

Print topic Send  topic

Author Message

Posts: 1
Posted: 09/26/2004, 2:50 AM

First excuse my poor english.

I'm using Codecharge Studio, my project is in PHP+MySQL.

I have created an editable grid with is a JOIN select query.
I want to allow users to change and update only one field per row, "publication". I converted every other control to textbox (except the primary key "id_record" -> hidden textbox).
When the editable grid retrieves the database values it's ok, each textbox reflects correctly the database values.

I created a custom update query, which update the database field "publication" for each row:
Parameters :
publication publication Control

The problem comes here :
When I submit the grid, ALL of the records are updated with the LAST row value.

What can I do ?

Thank you for your reply.

View profile  Send private message
Anton Hinxman
Posted: 12/14/2004, 11:23 AM

Yep, I had this as well, until...

The light dawned on me and I realised that I was looking at spent data.

What do I mean 'spent data'?

In the MVC the page was submitted and all the data resides in the data portion of the model so any value you look at in the 'view' of the grids controls is the last row value. Basically do not use the control values at this stage. It is all sql builds using the data portion of MVC at this point.

I do Java, not PHP, but you need to get at the parameters used to build each submitted sql update in the 'Before Execute Update Event'.

In Java this is the event:

public void afterExecuteUpdate(DataObjectEvent e) {
and I use:


You will need to do the same but in PHP.

It's great stuff once you get it working. You can devise your own sql updates to do anything you want including multiple updates etc on each row of a grid.



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

MS Access to Web

Convert MS Access to Web.
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.