Results 1 to 4 of 4

Thread: Tag system with mysql and php

  1. #1
    Join Date
    Oct 2008
    Posts
    27

    Tag system with mysql and php

    I have tagged a nice little site for myself and my friends, where I can upload some pictures, and then they can see them when they are logged.
    But I would like to "tag" them. Like the face book. My question is now how this is done smartest. The whole page is coded in php and mysql.
    I've messed around with two ideas in their heads. One saves you who are at each image in each frame. But I think will make the search on the tags a bit cumbersome.
    The second idea save by users of the album and pictures they have on.
    I would also like to make it such that when all members album is displayed as shown in a small box below, who are involved in the album (like this must be subtracted from the roof-system).
    I worked properly with two databases. One of the photos are broken down by album, and one which uses the info.
    It really does not itself coding I must have help with, but more how it's smartest to put up.

    Hope you can help.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: Tag system with mysql and php

    Hmmm, I would make a many to many relationship.

    So like this

    [Image table] -> [Ref to the tags] <- [Tags to Table]

    So it is just about how to set up code tags, and put them in the picture

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Tag system with mysql and php

    Select tag from tags where imageid = <imageid>

    Something in the style, is a few years since I last messed with php

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Tag system with mysql and php

    Quote Originally Posted by MindSpace View Post
    Select tag from tags where imageid = <imageid>

    Something in the style, is a few years since I last messed with php
    There is not much of the php there.

    As Katty says it is a many-to-many relationship you need time in. I will recommend to read this page:
    How to handle a Many-to-Many relationship with PHP and MySQL

    [Image table]
    -> Billed_id
    -> Billed_url

    [Tags]
    -> Tag_id
    -> Billede_id
    -> Person_id
    -> Y_num
    -> X_num

    [Profiles]
    -> Profil_id
    -> Profil_tekst

    (... Look only now the date of issue.

Similar Threads

  1. Replies: 4
    Last Post: 13-01-2011, 01:08 AM
  2. mysql config file in MySQL
    By Netorious in forum Software Development
    Replies: 4
    Last Post: 18-03-2010, 09:43 PM
  3. Can I use MySQL API for C++?
    By Rob Dizzle in forum Software Development
    Replies: 5
    Last Post: 23-01-2010, 07:58 PM
  4. Replies: 3
    Last Post: 07-11-2009, 09:36 PM
  5. MySQL with PHP
    By Gyan Guru in forum Guides & Tutorials
    Replies: 2
    Last Post: 18-11-2008, 04:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,486,070.24230 seconds with 16 queries