Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All..
I have Table Like This
sno  name  regno
1    Jhon  p1201
2    mark  p1203
3    bell  p1205
4    bean  p1206

When I update sno 1 record regno to 2101 remaining all records Should be Like this
sno name  regno
1   Jhon  2101 
2   mark  2102
3   bell  2103 
4   bean  2104

Am Out Of ideas Can Any One Help Me Please
Thanks In Advance

[edit]Code block added, "Ignore HTML..." option disabled - OriginalGriff[/edit]
Posted
Updated 28-May-11 20:34pm
v2

1 solution

You could provide a trigger, and execute a stored procedure to do this: MySql Trigger[^] But You will have to be careful when you write the SP: make sure you are only doing this for the one record. You had also better document this pretty damn well because it is going to confuse some poor sod one day!

Instead, I would do it in code: easier to see, easier to understand - particularly if it is a one-off operation.
 
Share this answer
 
Comments
Kim Togo 29-May-11 3:04am    
Good call. My 5.
tulasiram3975 30-May-11 6:36am    
But I Want TO Do In Php Mysql EDIT Window With out using SP & TRIGGERS

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900