Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
update by order of modification please help
Old 07-01-2011, 12:27 AM update by order of modification please help
Skilled Talker

Posts: 96
Name: Joan
Trades: 0
Hello, i'm not sure if this is possible, i can not get the logic or a way to do this using php, i know that pretty much anything can be done with php. heres the problem..

this is the example i have the form with 10 fields.. i have the edit page and external page with events to be applied when the form is open.. in the events page there are functions 1. is before the record is edited 2. after the record is updated. this is the way is working..

field general = general_notes this is a read only field..

field1 = notes1
field2 = notes2
field3 = notes3
field4 = notes4

this is what i have now and is working...

PHP Code:
$general_notes $value['notes1']." ".$value['notes2']." ".$value['notes3']." ".$value['notes4']; 

$sql "UPDATE vital SET general_notes = '$general_notes' WHERE case_n = '".$value['case']."'"
$res mysql_query($sql,$conn); 
ok so this is the thing the order right now is notes1, notes2, and so on... sometimes they only edit notes2 so i need that the notes they edit go to the last place for example if they edit only notes 2 this would be the order

PHP Code:
$general_notes $value['notes1']." ".$value['notes3']." ".$value['notes4']." ".$value['notes2']; 
im not sure how to achieve this, or if its even possible. first i need to know which record is actually being edited.. please help.. thanks
stivens is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-02-2011, 07:33 AM Re: update by order of modification please help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You need to have a timestamp column to hold the last edited time and date and ORDER BY that column.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to update by order of modification please help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10349 seconds with 12 queries