* 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
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
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 mb f
ram mem713 n
ram me1112 f
ram mem704 n
ram me1081 n
and I need
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:
> > >
> > >
> 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
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
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
5 z bla8 1
and id = 1 and I need select these rows:
id_k typ nazev i
Hi all!
I would like to ask your advice on a script that I wrote. As you can surely
see from my script below, I really need help as I am totally new to PHP.
Regular expressions are my worst nightmare because I don't have a
background in software programming: I'm just kidding around here! Please
po
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
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
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
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
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 "selections". An example:
If hypothetical row 129 is a Pu
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: [
Hi Guys,
If I wanted to retrieve just one field randomly from a MySQL table, would I
just use something like:
"SELECT RAND(id) FROM table LIMIT 0,1" ?
I suppose the best thing for me to do would be to try it, but I am fast
losing the will to stay awake ;)
Thanks, as always,
James.
--
15 matches
Mail list logo