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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:11:14+00:00 2026-05-14T03:11:14+00:00

Hy! Here is my problem: i have a profile and this profile has for

  • 0

Hy!

Here is my problem: i have a profile and this profile has for example 100 images.

When someone visit this profile the first image will be the first result of my query that sorts by updated_at.

But if the user would want to put the image with the (id = 8) to be the first, then (id = 22) then (id = 88) and so on?

I need to put another field or is really necessary a new table to make a custom sort on images? and maybe someone explain this to me how to do?

thanks, i appreciate your help 😉

EDIT:
(i appreciate if could be made with a really small amount of rows affected)
for example if i have 100 images, and i swap the 4th with the 89th will be affected only 2 rows

if i have to delete the 1st image, 99 images should be updated? thats really a bad situation. Or the field could begin with number 2?(the first image had the order_field = 1)

EDIT2:
if i have 100 images, with the order_field from 1 to 100, and then the user want to add a new image and to be first, then all them should be changed, right? this is something i dont want…

  • 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-14T03:11:14+00:00Added an answer on May 14, 2026 at 3:11 am

    Create other column/field in the same table called position or order.

    In this case you’ll store the image position in this column. When you retrieve the images for the user profile, you’ll know beforehand in which position to show the user’s images.

    This of course requires that the user specify the image relevance (position). This column in the DB table can even be null. If it’s null you can show this image in whatever position. The images that have this field filled should appear in the specified order.

    Just and idea…

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

Sidebar

Related Questions

Here's my problem - I have some code like this: <mx:Canvas width=300 height=300> <mx:Button
My problem is this, I have a UC called profile that contains another UC
Okay, so, here's my problem: I have developed a .NET 4.0 (Client Profile) +
Here is the problem I have: I have a lot (tens of thousands) of
Here's my problem: I have a virtual method defined in a .h file that
Here is the problem: we have lots of Javascripts and lots of CSS files,
Here's my problem: I have to call a web service with a secure header
Here's my problem.I have 2 xmlfiles with identical structure, with the second xml containing
Here is the problem: We have all of our development under subversion, but our
Here's my problem: I have do create a menu/list of actions (which would be

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.