I guess it would be more accurate.
Oh database you said, so one more suggestion (maybe later when a lot of people will use the sig) is to make a sort of "daily caching" of the image, I explain:
if you're planning to show only data that will not change in 24hrs, making a select on db for every single request the banner receives (and in forums like this one it's easy to get thousands) would be hard work for the db table, and in some way useless since it's not changing anything, the image displays always the same data
for each id.
So I could suggest to render with GD functions the image-per-id only ONCE per day, and save it phisically in your webspace in a subfolder (you call the file "img
$id.png"), so the following thousands of requests will be just redirected to the data contained in that cached png, instead of querying the db and gd-rendering the image every single time. Clean rudely all cached pngs in the subfolder every day (chronjob) or simply check the single img-id for date.
To output the data of existing image you can use
fpassthru() function. Works pretty cool and saves db and script work!
Hope it's understandable!