"SELECT min(id),max(id) from images where gallery_path like '/px6%'") or die $d->errstr;