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 8933461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:32:33+00:00 2026-06-15T09:32:33+00:00

So basically, i’m trying to make some sort of timeline with the post of

  • 0

So basically, i’m trying to make some sort of timeline with the post of my users, that gives me the posts of all users ordered by time. But instead, gives me the following:

*User1  'post1',
 User1  'post2',
 User1  'post3'..

*User2  'post1',
 User2  'post2',
 User2  'post3'..

I want all the post ordered instead of all the posts from user1 then all the posts from user2, etc. Well i hope it made sense thank you guys.

The query

  <?php
$varq1 = mysql_query('SELECT id2 FROM followers WHERE id ="'.$_SESSION['id'].'"');
    while($req5 = mysql_fetch_array($varq1)){

$req9=$req5['id2'];
$nsql = mysql_query('SELECT content, id, profile_id FROM contenido WHERE profile_id in("'.$req9.'") order by content_time desc');**strong text**
while($nrow = mysql_fetch_array($nsql)){    
?>

The HTML/ php call

<div class="divider">
<center><?php echo  "".$nrow['content'].""; ?><center/>
</div>
  • 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-06-15T09:32:35+00:00Added an answer on June 15, 2026 at 9:32 am

    you can do both queries in a single one … giving you the ability to sort by time

    select content,id, profile_id from contenido where profile_id in (SELECT id2 FROM followers WHERE id ="'.$_SESSION['id'].'") order by content_time desc
    

    fetch that and you will have exactly what you want 🙂 all the posts from different users sorted by time.

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

Sidebar

Related Questions

Basically I have some simple code that does some things for files and I'm
Basically what I'm trying to do is make a very simple vertical bullet projectile
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
Basically i've a table for my users (it's nightclub website) and now i'm trying
Basically, I have a UIImageView that will loop through 8 PNGs over 0.5 seconds.
Basically I've made a form in Cakephp 2.1 with a jQuery button that appends
Basically from C++ FAQ I learned that: A virtual function allows derived classes to
Basically, what I'm trying to create is a page of div tags, each has
Basically, I have a main page (parent page) with a link that opens up
Basically this function is meant to store the height value of the element that

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.