Skip to content

Instantly share code, notes, and snippets.

@rfay
Created March 22, 2011 03:07
Show Gist options
  • Select an option

  • Save rfay/880691 to your computer and use it in GitHub Desktop.

Select an option

Save rfay/880691 to your computer and use it in GitHub Desktop.
$result = db_queryd('SELECT f.fid, f.filepath, u.nid AS u_nid, cu.nid AS c_nid, cu.cid AS c_cid
FROM {pift_test} t
JOIN {files} f
ON (t.type = %d AND t.id = f.fid)
LEFT JOIN {upload} u
ON f.fid = u.fid
LEFT JOIN {comment_upload} cu
ON f.fid = cu.fid
WHERE t.status = %d
LIMIT %d', PIFT_TYPE_FILE, PIFT_STATUS_QUEUE, PIFT_XMLRPC_MAX);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment