| Al von Ruff
|
244
|
 |
|
04-17-2006 11:06 AM ET (US)
|
|
As Rafe pointed at, title.cgi uses the title_id as its argument, as that is 1} unique, and 2] immutable (title names *do* change over time as they are edited). If you want to obtain a list of records by title name, it would roughly be:
def SQLloadTitle(titlename): query = "select * from titles where title_title='%s';" % db.escape(titlename) db.query(query) result = db.store_result() title = result.fetch_row() results = [] while title: results.append(title[0][0]) title = result.fetch_row() return results
Which would return a list of all title_id's by that name. This would not be adequate, as authors sometimes name their collections after a particular short story (for example "Bears Discover Fire), it would also include reviews of the title in question (for example Greg Egan's "Distress").
|