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
Hi,
I have a client with a database of around 17k entries. Now due to powers out
of my control the table structure looks like:
CREATE TABLE londonhotelsallphotos (
HotelID double default NULL,
active_hotel_photo_Name varchar(255) default NULL,
URL varchar(255) default NULL,
Number varchar(
3 matches
Mail list logo