Re: [PHP] SQL select

2003-07-21 Thread Curt Zirzow
* Thus wrote Jiøí Nìmec ([EMAIL PROTECTED]): > > and I need only first row of each component order by type. so: > > cooler aa1317 f > cpu cpu177 f > gk NULL i > mb mb f > ram me1112 f > > has somebody some idea hot to select? Suggestion: invest in a SQL book. Curt -- "I used to think I wa

Re: [PHP] SQL select

2003-07-21 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 21 Jul 2003 at 11:08, lines prefixed by '>' were originally written by you. > heloo, > i have got a MySQL table: > id_comp id_goods type > has somebody some idea hot to select? This is off topic for this list but here goes... SELECT * F

Re: [PHP] SQL select

2003-07-10 Thread Adam Voigt
Hmm. How about: SELECT DISTINCT id_k, name FROM tablename WHERE typ != 'z' ORDER BY typ ASC; Does that work? On Thu, 2003-07-10 at 11:29, Mark wrote: > > Jiøí Nìmec wrote: > > > > > hello, > > > > > > i have got a problem with SQL select: > > > > > > I have got a table such this: > > > > > >

Re: [PHP] SQL select

2003-07-10 Thread Mark
> Jiøí Nìmec wrote: > > > hello, > > > > i have got a problem with SQL select: > > > > I have got a table such this: > > > > id_k typ name id > > 1 f bla1 1 > > 2 f bla2 1 > > 2 i bla3 1 > > 3 z bla4 1 > > 3 f bla5 1 > > 4 i bla6 1 > > 4 z bla7 1

Re: [PHP] SQL select

2003-07-10 Thread Marek Kilimajer
I did not understand you much but would not this work? SELECT * FROM table WHERE typ='f' OR typ='i' Jiří Němec wrote: hello, i have got a problem with SQL select: I have got a table such this: id_k typ name id 1 f bla1 1 2 f bla2 1 2 i bla3 1 3 z bla4 1 3 f bla5

Re: [PHP] SQL Select Unique() ?

2001-05-02 Thread CC Zona
In article , [EMAIL PROTECTED] (Anuradha Ratnaweera) wrote: > > Is there a method of extracting rows from a MySQL table Uniquely (as in only > > once) ?. For example, when a user performs a search, using two words, > > it may return the same r

Re: [PHP] SQL Select Unique() ?

2001-05-02 Thread Anuradha Ratnaweera
On Thu, 19 Apr 2001, James, Yz wrote: > Is there a method of extracting rows from a MySQL table Uniquely (as in only > once) ?. For example, when a user performs a search, using two words, > it may return the same row twice if the search is spread over two or more > SQL "selections". An exa

Re: [PHP] SQL Select Unique() ?

2001-04-19 Thread CC Zona
In article <9bng4u$ftc$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("James, Yz") wrote: > $sql = "SELECT * FROM table WHERE category LIKE 'Public House / Restaurant' > OR description LIKE 'Public House / Restaurant'"; > > Surely that would bring the same row back twice Surely not. Have you trie

Re: [PHP] SQL Select Unique() ?

2001-04-19 Thread David Robley
On Fri, 20 Apr 2001 05:41, James, Yz wrote: > Hi Guys, > > Is there a method of extracting rows from a MySQL table Uniquely (as in > only once) ?. For example, when a user performs a search, using two > words, it may return the same row twice if the search is spread over > two or more SQL "sel

Re: [PHP] SQL - Select rand() ?

2001-04-17 Thread Steve Lawson
Sup, In the newer versions of mySQL, you can get random results like SELECT id FROM table ORDER BY rand() LIMIT 0,1 SL. - Original Message - From: "James, Yz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 17, 2001 2:55 PM Subject: [PHP] SQL - Select rand() ? >