Re: Order by price?

2004-04-29 Thread Gerald Taylor
I want to count the passing and failing scores of a group of tests so I have a table with a row that describes each test Each test has a minimum passing score. Each test can be run an arbitrary number of times so I have a table of scores, which uses test id as a "foreign key". what I would like

RE: Order by price?

2004-04-29 Thread Yoed Anis
if your curious. Best, Yoed -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 12:28 PM To: Yoed Anis; [EMAIL PROTECTED] Subject: Re: Order by price? At 12:14 -0500 4/29/04, Yoed Anis wrote: >I'm having trouble with this query: >SELEC

Re: Order by price?

2004-04-29 Thread Robert J Taylor
Paul DuBois wrote: *snip* Sounds like you want: ORDER BY ROUND(($varA*(establishments^2)+$varB*(establishments)+$varC),2) Perfect. (I'm saying, "duh" over here to myself!) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[E

RE: Order by price?

2004-04-29 Thread Yoed Anis
#x27;ll work :-) Thanks guys, Best, Yoed -Original Message- From: Robert J Taylor [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 12:23 PM To: Yoed Anis; [EMAIL PROTECTED] Subject: Re: Order by price? Yoed Anis wrote: >I'm having trouble with this query: >SELECT >

Re: Order by price?

2004-04-29 Thread Paul DuBois
At 12:14 -0500 4/29/04, Yoed Anis wrote: I'm having trouble with this query: SELECT CONCAT('$',ROUND(($varA*(establishments^2)+$varB*(establishments)+$varC),2)) as price FROM table ORDER BY price A note first. The column "establishments" is an int(10), as you see I am taking this number through a f

Re: Order by price?

2004-04-29 Thread Robert J Taylor
Yoed Anis wrote: I'm having trouble with this query: SELECT CONCAT('$',ROUND(($varA*(establishments^2)+$varB*(establishments)+$varC),2)) as price FROM table ORDER BY price Hint: you've made this a "string" comparison using CONCAT, i.e., alphabetical, not numerical, sorting rules apply. How a

Re: Order by price?

2004-04-29 Thread Daniel Clark
I think when adding the $ the number gets convert to a string. And then the query orders it by alpha numberic. > I'm having trouble with this query: > SELECT > CONCAT('$',ROUND(($varA*(establishments^2)+$varB*(establishments)+$varC),2)) > as price FROM table ORDER BY price > > A note first. The c