Canadian Mac Forums at ehMac banner

1 - 3 of 3 Posts

·
Premium Member
Joined
·
2,263 Posts
Discussion Starter · #1 ·
Im thinking of a sql query statement where the result set is sorted by 2 columns at the same time is this possible?
For example if I have a list of items with titles and numbers, but it is the combination that is a unique key
would this work for example
SELECT * FROM TABLE ORDER BY TITLE, NUMBER
this is how I want the data
for example
APPLE 1
APPLE 2
BANNA 1
BANANA 2
any of you geniuses have any suggestions, if this would work in Mysql
or should I have separate tables for the Title list and item entries. My other idea is to select all the titles from a title table , then as I go down the title table , select all the entries in the item table and list them by number, this would work but needs an extra table and a couple extra lines of code, and we wouldnt want that.
 

·
Premium Member
Joined
·
2,263 Posts
Discussion Starter · #3 ·
Hi hayesk
Thanks for the reply
Im juist in the middle of setting up a personal web site with some mysql tables
So, it will be a while, before I get it all functional.
Do you do much database, sql, Oracle or mysql programming?
Im finding it kind of fun to be able to get data displayed in web pages from MySql tables.
 
1 - 3 of 3 Posts
Top