Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6734195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:51:36+00:00 2026-05-26T10:51:36+00:00

I’m trying to sketch out a database template on some design paper, and I’m

  • 0

I’m trying to sketch out a database template on some design paper, and I’m having trouble with dependencies.

Users submit content to the website for viewing, and the content is given priorities based on what kind of content it is. I also would like the priorities, however, to be set by user. Basically, if person A is person B’s friend, the content submitted by person A is high priority for person B. Person C is not person A’s friend, so the content is low priority for person C in this medium.

I don’t even know where to begin. Any push in the right direction would be appreciated. I think that this is a MySQL question; however, I am using PHP as the server-side scripting language, and I’m wondering if the math makes it so that there isn’t a solution via MySQL.

I’m thinking about just using a region for friend content and not messing with priorities, currently.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:51:36+00:00Added an answer on May 26, 2026 at 10:51 am

    As long as you track what you need it shouldn’t be problem, the trick will be in writing the Sql. For instance if you had the following table structure

    person
    ------
    id
    name
    otherstuff
    
    person_releationship
    -------------------
    person_a_id
    person_b_id
    relationship_type_id
    
    relationship_type
    -------------------------
    id
    content_priority
    
    content
    --------------
    id
    stuff
    person_id
    user_priority
    

    You could write the following statement which would retrieve all the content associated with a person, excluding their own content, prioritized by content_priority

    SELECT
        stuff
    FROM 
        content c
        INNER JOIN person p
        ON c.person_id = p.id
        INNER JOIN person_releationship pr
        ON p.person_id = pr.person_a_id 
           or p.person_id = pr.person_b_id 
        INNER JOIN relationship_type rt
        ON pr.relationship_type_id = rt.id
    WHERE
        p.id = "A"
        and c.person_id <> "A"
    ORDER BY
        rt.content_priority, 
        c.user_priority
    

    If you want you could also use weighted priority so the ORDER BY could be

    ORDER BY
    rt.content_priority *  c.user_priority
    

    You should note that this SQL and table design is independent of the RDBMS and the web technology.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.