CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Editable grid force insert of existing records

Print topic Send  topic

Author Message
telmiger

Posts: 61
Posted: 11/11/2004, 1:13 PM

I populate the editable grid from a table that contains default data.

The editable grid also has a search/filter form.

When clicking on the submit button of the editable grid I would like it to insert all filtered data into a new table. ( I will not have to update existing records from this form)

I used the custom insert to speficy the other table but how do I force the editable grid to insert records that normally would only be updated?

Hope this makes sense

Tony Elmiger
View profile  Send private message
DonB
Posted: 11/12/2004, 7:33 AM

Might be better to simply code before update/insert/delete events (whatever
suits your needs) to execute a query more or less like:

$db = new clsDBmyconnection;
$db->query("INSERT table2 SELECT * FROM table1 WHERE " . $grid1->ds->Where);
unset($db);


The Where property will tell you what records are "in the grid" (table1) and
the query simply selects those same records from table1 and inserts them in
table2.

You can set the UpdateAllowed, InsertAllowed, DeleteAllowed property of the
grid to false, too, and avoid touching the content of table1 (cancels the
insert/update/delete of grid1.
--
DonB

http://www.gotodon.com/ccbth


"telmiger" <telmiger@forum.codecharge> wrote in message
news:54193d5fd6e74e@news.codecharge.com...
> I populate the editable grid from a table that contains default data.
>
> The editable grid also has a search/filter form.
>
> When clicking on the submit button of the editable grid I would like it to
> insert all filtered data into a new table. ( I will not have to update
existing
> records from this form)
>
> I used the custom insert to speficy the other table but how do I force
the
> editable grid to insert records that normally would only be updated?
>
> Hope this makes sense
>
> Tony Elmiger
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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 http://support.yessoftware.com.

Web Database

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

Home   |    Search   |    Members   |    Register   |    Login


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