« title element wrong for media ingest | Main | utf-8 utf-16 and UNIX »

Some useful drupal sql

Find uid given user nae (in this case naa)
select uid from users where name='naa';
Get the number of uploads by user 'naa'
select count(upload.fid) from upload, node where node.nid=upload.nid and node.uid=(select uid from users where name='naa');

Get the number of files owned by user 'naa'
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;
Find path to uploaded files:
select files.filepath from files, upload where upload.fid=files.fid and upload.nid=68652;

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)