SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Meta tag information via a mysql database?

    Hi Everyone,

    I'm having some trouble figuring out a way to display unique meta tag information through a mysql database. For example, if my website has 10 pages and I want to display 10 different meta tag results for each page, how would I go about doing so?

    I know I need to pull information from the database, which I can do.
    http://whatsmyowncarworth.com/class-...3/metatags.php

    But how would I put the above corresponding information on the correct pages? I'm guessing the page itself would need some sort of unique ID that's associated with that meta tag information?

    Thanks!

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by scm22ri View Post
    I'm guessing the page itself would need some sort of unique ID that's associated with that meta tag information?
    yup

    by the way, what was the point of linking to this page --
    Code:
    Rhode Island <br>Cranston <br><hr/>Florida <br>Key West <br><hr/>Florida <br>miami <br><hr/>
    what has this to do with metadata? it isn't even a valid html page
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi r937,

    Thanks for the reply.

    yup
    For example, the unique ID for state/city Rhode Island = Cranston would be 1, For Florida = Orlando would be 4 etc ....
    http://whatsmyowncarworth.com/class-...3/metatags.php

    I would then have to write a mysql command that takes every ID and puts it on every indiv. unique page?
    Am I correct in what I say above? or am I totally off?

    The reason why I linked to that page is to show the ID information that I might be identifying with (although, I forgot to echo out that info. when I first asked the question. I also added some information as well.)

    Thanks for your help!

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by scm22ri View Post
    I would then have to write a mysql command that takes every ID and puts it on every indiv. unique page?
    um...

    how do you now distinguish which page gets displayed? what's your url scheme?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Thanks for the response.

    how do you now distinguish which page gets displayed? what's your url scheme?
    That's part of my problem. I'm not sure how to even set this up. Every php page that I've made has been manually built. I'm assuming I would need to build pages through the back-end and create modules while doing so? If what I just said is %100 wrong, let me know. How would you guys attack this problem?

    Thanks!

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    i give each page a name and a title

    my url scheme uses the name, while the page itself displays the title

    links to my pages would therefore look like this --

    <a href="http://example.com/index.html">Home</a>
    <a href="http://example.com/about.html">About</a>
    <a href="http://example.com/my-sweet-kitteh.html">My Sweet Kitteh</a>

    the name is the primary key in the database table (i don't use numeric ids), and is therefore unique

    the title is one of the many data columns in the table, and metadata is in several other columns
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •