Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Trying to get a specific value from db, for the current page

    I am trying to get the title from Nextgen Gallery.

    This is the code I have:

    PHP Code:
    <?php 
    global $nggdb;
    $gallery $nggdb->get_gallery(4'sortorder''ASC'true10);
    foreach(
    $gallery as $image) {
        echo 
    $image->alttext;
    }
    ?>
    I know that like this I get to the db, and I am also able to get the first image's title.

    But the problem is that I am not getting the current page/image title. Only the first one.

    How can I get a dynamic title (alttext) and not only the first one?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,456
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    I think we need to see this function: get_gallery(4, 'sortorder', 'ASC', true, 1, 0)

    ... in order to know what the various fields mean.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •