SQL select

This is a discussion on SQL select within the PHP General forums, part of the PHP Programming Forums category; heloo, i have got a MySQL table: id_comp id_goods type cooler aa1256 n cooler aa1255 n cooler aa1317 f cooler ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-21-2003
JiøîÆèî eË
 
Posts: n/a
Default SQL select

heloo,

i have got a MySQL table:

id_comp id_goods type

cooler aa1256 n
cooler aa1255 n
cooler aa1317 f
cooler aa1196 n

cpu cpu183 n
cpu cpu177 f
cpu cpu190 n

gk gk1265 f
gk gk1258 n
gk NULL i
gk gk1193 n
gk gk1257 n

mb mb1111 f

ram mem713 n
ram me1112 f
ram mem704 n
ram me1081 n

and I need only first row of each component order by type. so:

cooler aa1317 f
cpu cpu177 f
gk NULL i
mb mb1111 f
ram me1112 f

has somebody some idea hot to select?

jiøí nìmec, ICQ: 114651500
www.menea.cz - www stránky a aplikace

Reply With Quote
  #2 (permalink)  
Old 07-21-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] SQL select

* Thus wrote Jiøí Nìmec (konference@menea.cz):
>
> and I need only first row of each component order by type. so:
>
> cooler aa1317 f
> cpu cpu177 f
> gk NULL i
> mb mb1111 f
> ram me1112 f
>
> has somebody some idea hot to select?


Suggestion: invest in a SQL book.

Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0