The following works in MySQL, but obviously (and unlike your client!) you'll
want to do this on a copy of the table first...
update londonhotelsallphotos set Number = ( if (@hi != HotelID, @line := 1,
@line := @line + 1)), HotelID = (@hi := HotelID)
Note that if you run this query more than onc
I think you (or me) will make some php code out of kindness. Order the
rows by the id (still there should be some REALLY uniq id) ad then
update the same row with a variable that you reset each time that you
encounter new id.
$i=0;
while($row=...) {
if($prev != $row['HotelID']) {
$i=0;
$pr
2 matches
Mail list logo