Junior Member
Junior Member
lukehough   2008-12-03, 19:54
#1

The current query method is this:
$result = query_single_row(' SELECT EXIFOrientation FROM '.prefix('images').' AS i, '.prefix('albums').' AS a WHERE i.albumid = a.id');
which returns all EXIFOrientation entries, then selects the first. Since the unique image ID does not appear to be available to this function, I have passed $imgfile containing the full file path. Then queried based on $imgfile containing the album directory and image filename.

function getImageRotation($imgfile) { $result = query_single_row(' SELECT EXIFOrientation FROM '.prefix('images').' AS i JOIN '.prefix('albums').' as a ON i.albumid = a.id WHERE "'.$imgfile.'" LIKE CONCAT("%",a.folder,"/",i.filename)');
This should return a unique result.

Disclaimer: I'm no pro so some of this may be wrong.

-Luke

Member
Member
sbillard   2008-12-04, 02:18
#2

Thanks, fix is in the nightly build tonight.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.