Devam Ediyor

477666 PHP code required for MySQL update

I require a php page to read from 2 MySQL tables and perform the following replacements on a single MySQL table

I would like a php page to read/write/update from user input the 2 config_extra fields in table1 (config_extra) with action button #1

I would like a php page to update (find/replace) the 4 orders fields in table2 (orders) through the entire database with action button #2

I would like the php page to echo 'You have successfully updated all credits and payments for (supplier_paid) on Cheque date (date_paid)' after action button#2

--------------------

table1 = config_extra

field = supplier_paid

field = date_paid

Action button #1

Update

field = supplier_paid

field = date_paid

---------------------

table2 = orders

field = supplier1_paid

field = supplier2_paid

field = supplier2_paid

field = supplier2_paid

field = pymnt_1

field = pymnt_2

field = pymnt_3

field = pymnt_4

field = comments_supplier

field = comments_supplier2

field = comments_supplier3

field = comments_supplier4

Action button #2

Update/Replace (this is what I need it to do)

update orders replace(supplier1_paid,'Invoiced','PaidCHQ') where pymnt_1 = 'date_paid' and comments_supplier = 'supplier_paid' ;

update orders replace(supplier2_paid,'Invoiced','PaidCHQ') where pymnt_2 = 'date_paid' and comments_supplier2 = 'supplier_paid' ;

update orders replace(supplier3_paid,'Invoiced','PaidCHQ') where pymnt_3 = 'date_paid' and comments_supplier3 = 'supplier_paid' ;

update orders replace(supplier4_paid,'Invoiced','PaidCHQ') where pymnt_4 = 'date_paid' and comments_supplier4 = 'supplier_paid' ;

update orders replace(supplier1_paid,'CreditDue','Credited') where pymnt_1 = 'date_paid' and comments_supplier = 'supplier_paid' ;

update orders replace(supplier2_paid,'CreditDue','Credited') where pymnt_2 = 'date_paid' and comments_supplier2 = 'supplier_paid' ;

update orders replace(supplier3_paid,'CreditDue','Credited') where pymnt_3 = 'date_paid' and comments_supplier3 = 'supplier_paid' ;

update orders replace(supplier4_paid,'CreditDue','Credited') where pymnt_4 = 'date_paid' and comments_supplier4 = 'supplier_paid' ;

------------------------

echo 'You have successfully updated all credits and payments for (supplier_paid) on Cheque date (date_paid)'

The databse has been connected to.

The database is currently queried like this '$orders = tep_db_query(

Beceriler: Her şey Kabul, MySQL, PHP

Daha fazlasını görün: find code, read write update, mysql php single page, write mysql, mysql update field, mysql date field, mysql update database, action php, php code write, find replace, code read, read code database, mysql update table, write code mysql, read code, mysql database php code, database update required, mysql database orders, read action php, user credits php, field update, read php code, required orders, mysql php input, php code mysql

İşveren Hakkında:
( 10 değerlendirme )

Proje NO: #2223573

Seçilen:

akiles99

will be done...

1 gün içinde 100$ USD
(236 Değerlendirme)
6.3