Re: reorder records in database

2008-05-25 Thread Paul DuBois
On May 15, 2008, at 1:38 PM, afan pasalic wrote: hi, I have a table with tasks. column status could be 1 (means todo) and 0 (meas done). also,have column order_no to sort tasks by priorities. once in a while order_no is not in order, e.g 1, 2, 3, 5, 6, 8, 11, 12, 13, 19, 20,... (some

reorder records in database

2008-05-15 Thread afan pasalic
hi, I have a table with tasks. column status could be 1 (means todo) and 0 (meas done). also,have column order_no to sort tasks by priorities. once in a while order_no is not in order, e.g 1, 2, 3, 5, 6, 8, 11, 12, 13, 19, 20,... (some numbers are missing). is there built in function to reset

Re: reorder records in database

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 11:38 AM, afan pasalic [EMAIL PROTECTED] wrote: is there built in function to reset order_no or I have to create php script for it? There is not a built in way to do this. Using a user defined variable it is not all that hard to deal with though mysql drop table if

Re: reorder records in database

2008-05-15 Thread C.R.Vegelin
What about: ALTER TABLE tablename ORDER BY fieldname; HTH, Cor - Original Message - From: Rob Wultsch [EMAIL PROTECTED] To: afan pasalic [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Thursday, May 15, 2008 8:23 PM Subject: Re: reorder records in database On Thu, May 15, 2008

Re: reorder records in database

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 4:32 PM, C.R.Vegelin [EMAIL PROTECTED] wrote: What about: ALTER TABLE tablename ORDER BY fieldname; HTH, Cor First off, please don't top post if a conversation is not already top posting. It is the custom of the group to bottom post... Your solution does not remove