473,503 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fetch array, display and update, all in one.. ?

Hi All,

I have designed a debit-system database with a PHP frontend. The amounts
need to be updated on a monthly basis. now i have 10 clients in the system.
i can get all the fields and display them, but next to that, i need to
insert a field where we can enter an amount per client and after all the new
amounts have been filled in, i need to update the database with those
amounts entered.

I know that by using html forms to enter the info, i can submit the info and
do a update statement but the problem is, is that i need to dynamically add
the field to update the amount according to the amount of results resturned
from the database...

Hope you guys understand what i mean here... !
GM.
Jul 17 '05 #1
1 1892
In article <ch**********@ctb-nnrp2.saix.net>, <po**@gam.co.za> wrote:
Hi All,

I have designed a debit-system database with a PHP frontend. The amounts
need to be updated on a monthly basis. now i have 10 clients in the system.
i can get all the fields and display them, but next to that, i need to
insert a field where we can enter an amount per client and after all the new
amounts have been filled in, i need to update the database with those
amounts entered.

I know that by using html forms to enter the info, i can submit the info and
do a update statement but the problem is, is that i need to dynamically add
the field to update the amount according to the amount of results resturned
from the database...

Hope you guys understand what i mean here... !


If by "amount of results" you are refering to a row count, you could try:

mysql_num_rows() ?

If you mean a sum, you might be able to do something like:

SELECT SUM(field) FROM tbl ...

I'm not quite sure I understand the problem.

Jamie

--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3772
by: Paul C-T | last post by:
Hi, Am I trying to be too clever here? I am trying to write a PHP page to enable me to enter values into a form then write those values to a text file. I want to use the form & table that...
1
1758
by: Tommy | last post by:
Hi, I have 3 frames. One to let the user input a URL, one to display the page of that URL and one to display some info on that page (including all the links of the page). The problem is that...
4
8406
by: Fabian | last post by:
I have a three tier nested array, used to define a map for a javascript game, and can be edited within the web page. Is there a way I can generate a visible copy of this array that I can then c&p...
9
11054
by: Acupuncture | last post by:
Hi, I am developing a JDBC application and I encountered this problem (DB2 for ISeries). I want to do a select for update and also use the fetch first rows clause. This is my sql statement: ...
2
3934
by: technocrat | last post by:
HOW CAN THIS BE DONE IN JAVA??? THIS IS POSITIONED UPDATE EXEC SQL DECLARE C1 CURSOR FOR SELECT * FROM EMPLOYEE FOR UPDATE OF JOB; EXEC SQL OPEN C1;
5
1831
by: cdtsly | last post by:
Hi i have a table with all value at 4 i select all lines in a fetch i update one with a value of 7 i update all the row in the fetch with a value 5 the result is that all my row are at 5 and...
9
2461
by: =?Utf-8?B?UHJhdmlu?= | last post by:
We are using .net Framework 1.1 We are having one page on which we are using this Grid component. From this page we open a popup for adding new record as well as for editing an existing record...
1
4604
by: shorti | last post by:
I am on DB2 UDB V8.2 When I try to do a simple update with a "Fetch First" clause I get a syntax error: db2 "update exec_1 set lock = 100, level = 50 where level = 0 fetch first 100 rows...
10
7377
dj12345
by: dj12345 | last post by:
Hi, (Asp.net + Ajax) I am creating a page which will fetch data from server without postbak of a page.. I have 2 controls on this page TextBox and Lable. I have assigned TextBoxWatermark...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.