[development] Check if files is empty
Johan Forngren
johan at forngren.com
Mon Apr 23 14:45:57 UTC 2007
Hi all,
I need help with turning this query into something useful
SELECT fid FROM {files} WHERE filepath LIKE 'files/%' LIMIT 1
if (count(db_fetch_object(db_query("SELECT fid FROM {files} WHERE filepath
LIKE 'files/%' LIMIT 1"))) == 1) {
The purpose is to determine if there is some files within the dir 'files'
registered in the db. I'm stuck at the db_* stuff, any help would be greatly
appreciated. See also http://drupal.org/node/98824 .
Thank you
--
Regards,
Johan Forngren
johan at forngren.com :: http://johan.forngren.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070423/05c91f49/attachment.htm
More information about the development
mailing list