[PHP-DB] oops...Re: [PHP-DB] select distinct with all columns

2002-08-13 Thread leo g. divinagracia iii

oops, i accidentally sent it without finishing...

anyway, what i wanted to say was DISTINCT, at least how i learned it, was
working with rows instead of colums:

http://www.mysql.com/doc/en/DISTINCT_optimisation.html

is there a reason why you dont want to list the columns?

russ arbuthnot wrote:

 I have a mysql table named equipment with 11 columns named: id,
 staff_member, class, type, manufacturer, model, description, picture,
 created, modified, and published.

 I'm trying to write a select statement similar to this:

 SELECT DISTINCT type FROM equipement WHERE class = microphones;

 yet shows all 11 columns of the selected rows rather than just the
 type column.

 The only way I know how to show all the columns is to use SELECT *, or to
 list all the columns manually like SELECT id, type, class, ... etc.

 But when I tried doing this:

 SELECT DISTINCT type, id, staff_member, class, manufacturer, model,
 description, picture, created, modified, published FROM equipment WHERE
 class = microphones;

 I just got the exact same answer as if i would have done this:

 SELECT * FROM equipment WHERE class = microphones;

 so it didn't help.

 Can anyone offer a hint?
 Thanks,
 russ

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
Leo G. Divinagracia III
[EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] OOPS

2001-04-21 Thread Sharmad Naik

I wanted to learn OOP in PHP .I m using postgresql and have a table called 
price containing the price_of_recycle of an object (0th row for bottle,
1st row for create and 2nd row for cans).I wanted to write an OOPS 
PHP program that would extract the price from the database for the individual
object and multiply it to the number of object send to recycle by any person at
the browser and display the output
I m currently using Professional PHP to refer but couldn't grap much 
out of it.Pls help me.

-Thanks

-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]