Changeset 1313 for trunk/website/scripts/downloads.php
- Timestamp:
- 11/14/2009 4:28:52 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/website/scripts/downloads.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/website/scripts/downloads.php
r1312 r1313 217 217 } 218 218 219 //Insert the build into the database. 219 220 mysql_query('START TRANSACTION'); 220 221 mysql_query(sprintf('INSERT INTO downloads (Name, Released, `Type`, Version, PublisherID, Architecture, Filesize, Link) … … 237 238 238 239 mysql_query('COMMIT'); 240 241 //Ensure that only 3 builds are not superseded at any one time. 242 mysql_query('START TRANSACTION'); 243 mysql_query(sprintf('UPDATE downloads SET Superseded=1 244 WHERE Name LIKE \'%s%%\'', $path)); 245 mysql_query(sprintf('UPDATE downloads SET Superseded=0 246 WHERE Name LIKE \'%s%%\' 247 ORDER BY DownloadID DESC 248 LIMIT 3', $path)); 249 mysql_query('COMMIT'); 250 239 251 return $buildId; 240 252 }
Note: See TracChangeset
for help on using the changeset viewer.
