ISFDB talk:Missing Titles

Python script for finding publications without associated titles:

def CheckPubsTable: query = "select pub_id,pub_title from pubs" db.query(query) result = db.store_result record = result.fetch_row while record: query = "select pubc_id from pub_content where pub_id=%d" % ( int(record[0][0])) db.query(query) Presult = db.store_result if Presult.num_rows < 1: print "* No title: %d (%s)" % (record[0][0], record[0][0], record[0][1]) query ='select title_id,title_title from titles where title_title="%s"' % (record[0][0]) db.query(query) Tresult = db.store_result if Presult.num_rows > 0: Trecord = Tresult.fetch_row print "Found matching title:", Trecord[0][0], Trecord[0][1] record = result.fetch_row