Re: Re: How to get File Galleries info from Database?
Sorry, I meant to say:
Copy to clipboard
global $tikilib; $gallery = 'MyGallery'; $filename = 'MyFile.txt'; $queryGallery = "select * from tiki_file_galleries where name='".$gallery."'"; $resultGallery = $tikilib->db->query($queryGallery); $res = $resultGallery->fetchRow(); $galleryId = $res['galleryId']; $queryFilename = "select * from tiki_files where filename='".$filename."' and galleryId='".$galleryId."'"; $resultFilename = $tikilib->db->query($queryFilename); $res = $resultFilename->fetchRow(); return "MD5: ".$res['path'].".";