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 bigtiger's Avatar
    Join Date
    Oct 2005
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to build a view merge all and order by creation date?

    hi, I'am creating a small photo album that will placed on my site for upload photo. What I'am did is a basic table structure and can have albums and photos displayed seperately.
    But when I have a look at other photo forums. That can have albums and photos displayed together and ordered by creation date as the image attached.
    Let's me make it clear, what I'am said is a album could hold another albums and photos.
    But for now, I just could display albums first, then photos. And I wish to displayed all following the creation order, such as :

    1.) added a new album
    2.) added a new photo
    3.) added a new album

    and the display should be :
    [new album1] - [new photo1] - [new album2]


    Code:
    create table pbm_album (
    id tinyint(8) auto_increment,
    pbm_parent_id tinyint(8) not null
    pbm_name varchar(50) not null,
    pbm_description varchar(100) null,
    primary key(id)
    );
    
    create table pbm_photo (
    id tinyint(8) auto_increment,
    pbm_album_id tinyint(8) not null
    pbm_name varchar(50) not null,
    pbm_title varchar(50) not null,
    pbm_description varchar(100) null,
    foreign key pbm_album_id references pbm_album(id),
    primary key(id)
    );
    hmm... Also, Is there any suggestion about these tables and design issues?

    Thanks,
    Eric,
    Attached Thumbnails Attached Thumbnails How to build a view merge all and order by creation date?-pic.jpg  

  • #2
    New Coder bigtiger's Avatar
    Join Date
    Oct 2005
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I do know how to display albums information when there is no photos inside it. But when a album do hold both albums and photo. I'am just confuse how to do that. Any help?



    Thanks,
    Eric,


  •  

    Posting Permissions

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