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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:09:02+00:00 2026-06-12T05:09:02+00:00

I have created this table with a sql query that looks like this $result

  • 0

I have created this table with a sql query that looks like this

$result = mysql_query("SELECT * FROM 5050goosedown");

echo "<table border='0' width='975'>
<tr>
<th width='12.5%'>name:</th>
<th width='12.5%'>width:</th>
<th width='12.5%'>height:</th>
<th width='12.5%'>fill:</th>
<th width='12.5%'>our fill:</th>
<th width='12.5%'>old price:</th>
<th width='12.5%'>price:</th>
</tr>";

$i = 1;
while($row = mysql_fetch_array($result)){
    echo "<tr bgcolor='#F5F5F5'>";
  if($i%2 == 0){
      echo "<tr bgcolor='#E5E5E5'>";
  }
  $i++;

  echo "<td>" . $row['name'] . "</td>";
  echo "<td>" . $row['width'] . "</td>";
  echo "<td>" . $row['height'] . "</td>";
  echo "<td>" . $row['normal_fill'] . "</td>";
  echo "<td>" . $row['our_fill'] . "</td>";
  echo "<td>" . $row['old_price'] . "</td>";
  echo "<td>" . $row['price'] . "</td>";
  echo '<td bgcolor=#FFFFFF><form method="post" action=""><input type="hidden" name="goosedown_id" value="'.$row['goosedown_id'].'" /><input type="submit" name="sumbit" value="Delete" /></form></td>';
  echo "</tr>";
  }
echo "</table>";

?>

I was wondering what would be the best way to go about displaying the items in the table in a specific order because at the moment is is displaying in alphabetical order. However, I would like it to display in a order of size, i.e., single, super single, queen, king, super king…

I just dont know how to attempt this. Do you think maybe I need another entry in the database?

this is what the table looks like.. as you can see there is a section where people can enter their own values

enter image description here

mysql

CREATE TABLE `5050goosedown` (
    `goosedown_id` int(11) unsigned NOT NULL auto_increment,
    `name` varchar(100) NOT NULL default '',  
    `width` int(8),
    `height` int(8),
    `normal_fill` int(8),
    `our_fill` int(8),
    `old_price` DECIMAL(3,2),
    `price` DECIMAL(3,2), 
    PRIMARY KEY  (`goosedown_id`)
    ) TYPE=MyISAM;
  • 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-12T05:09:03+00:00Added an answer on June 12, 2026 at 5:09 am

    However I would like it to display in a order of size, i.e., single,
    super single, queen, king, super king…

    Then try this:

    ORDER BY
      CASE Size
        WHEN 'sigle' THEN 0 
        WHEN 'super' THEN 1
        WHEN 'single' THEN 2
        WHEN 'queen' THEN 3
        ...
      END , Name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi there I have an SQL table that looks like this: CREATE TABLE IF
I have an SQL table that looks like this: CREATE TABLE diet_watch ( entry_date
I have created a query that looks like this but I havent found a
I have a table that's created like this: CREATE TABLE bin_test (id INTEGER PRIMARY
I have a table that looks something like this: CREATE TABLE student_results(id integer, name
I have a very simple question. I have an SQL query that looks like
I have a BUSINESS table that looks like this: BUSINESS_ID | BRN | CODE
I have a table created like this: CREATE TABLE rh857_omf.picture(MeasNr TINYINT UNSIGNED, ExperimentNr TINYINT
I have created an index on my table like this: CREATE INDEX index_typ_poplatky ON
It looks like #temptables created using dynamic SQL via the EXECUTE string method have

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.