Jump to content

Mysql query problem


krisdmd

Recommended Posts

Hello,

I have a table called profiles.

I have 3 colums, id,property,value

The property has the items name,rating,birthday and the column value holds the value of each property.

Now i want to order my results by the property rating and value Desc.

I'm stuck here how i can do this ? Can anyone helps me with that ?

 

Link to comment
Share on other sites

Sure you can. How do you expect to use a table that has data just smushed together? As you are discovering, it sort of eliminates all the benefits of a relational database

Edited by Jessica
Link to comment
Share on other sites

you can store your data on your server any way you want. it does not matter what format it is received/retrieved as. you store it so that it makes sense for how you are going to use it and trying to efficiently search for properties by it's name, rating, birthday, or value requires that each of those values be stored in separate columns (unless of course your assignment is to show that you can come up with the query necessary to solve this, in which case you should be attempting to do this yourself rather than asking on a help forum.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.