# Program way of getting card review history

**URL:** <https://forums.ankiweb.net/t/program-way-of-getting-card-review-history/14370>\
**Category:** Add-ons\
**Created:** [October 23, 2021, 11:42am UTC](https://forums.ankiweb.net/t/program-way-of-getting-card-review-history/14370 "2021-10-23T11:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andik](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@andik](https://forums.ankiweb.net/u/andik)\
**Post date:** [October 23, 2021, 11:42am UTC](https://forums.ankiweb.net/t/program-way-of-getting-card-review-history/14370/1 "2021-10-23T11:42:40Z")

</div>

I have found way to get some reviewing table information, but it much different from table in card info window

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/c/cae0bcea7b8e3ca8c982c21019ed1c132d7b668b.png)

using python possible to get some of this information, but not date. It is also no way to check type by number. Python code for database browsing:  
mw.col.db.execute(“select \* from revlog where cid = %d” % someid)

columns, that it shows:

[0, ‘id’, ‘integer’, 0, None, 1]  
[1, ‘cid’, ‘integer’, 1, None, 0]  
[2, ‘usn’, ‘integer’, 1, None, 0]  
[3, ‘ease’, ‘integer’, 1, None, 0]  
[4, ‘ivl’, ‘integer’, 1, None, 0]  
[5, ‘lastIvl’, ‘integer’, 1, None, 0]  
[6, ‘factor’, ‘integer’, 1, None, 0]  
[7, ‘time’, ‘integer’, 1, None, 0]  
[8, ‘type’, ‘integer’, 1, None, 0]

Any information for program way of getting review info is usefull

---

<div class="post-metadata">

**Author:** ![ijgnd](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@ijgnd](https://forums.ankiweb.net/u/ijgnd)\
**Post date:** [October 23, 2021, 2:45pm UTC](https://forums.ankiweb.net/t/program-way-of-getting-card-review-history/14370/2 "2021-10-23T14:45:07Z")

</div>

I once made an add-on named [deck and card info sidebar during review](https://ankiweb.net/shared/info/673114053) that builds a custom version of the review table seen in the card info window. In my add-on I have a file named revlog.py that is a modification of the old python code that anki used to build the card info window.

I haven’t tested my add-on in anki version .45+ but at least I haven’t heard about problems with these versions so hopefully m code still works and maybe there’s something interesting for you in there. My code is not that readable - I’m not a programmer …
