I have a question on how to substitute a subselect in mysql.
For example lets say i have 3 tables Cars, Options and CarOptions
Cars consists of: uid, make
Options consists of: uid, option
CarOption consists of: uid, Caruid, Optionsuid
I want to select all Cars that have ALL of requested optio
given this,
how would you write a query to list all members that are part of group_id=1
AND group_id=2 AND ... group_id 20. without having to write 20 "JOIN
relationship r1 on r1.group_id =1 JOIN relationship r20 on r20.group_id
=20) wich gets extremely slow with large ammounts of JOINS.
coming back to my earlier question but much more simplified portion of it :)
I the following table :
theTable
---
ID | int (key)
colorID | int
itemID | int
---
how do I select all itemIDs that have colorID = 1 and colorID
lt;[EMAIL PROTECTED]>
Sent: Thursday, June 12, 2003 2:47 PM
Subject: Re: again with SELECT
> danchik wrote:
> > coming back to my earlier question but much more simplified portion of
it :)
> >
> >
> > I the following table :
> >
> > theTable
> > --
t; <[EMAIL PROTECTED]>
To: "Kevin Fries" <[EMAIL PROTECTED]>; "gamin" <[EMAIL PROTECTED]>; "danchik"
<[EMAIL PROTECTED]>; "Fred Whipple" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, June 12, 2003 3:59 PM
Subject:
i havent used php, but this following would be my guess:
mysql_last_id() most likely uses @@identity internaly. Someone mentioned
that it returns last insert id per connection, then I am guessing that it
calls select @@identity immediatly after any insert, and stores it to be
returned later in t
SELECT * FROM ardata
WHERE title REGEXP '.*2000.*'
change that into parameter, but if you want to search on multiple words as
OR, youll have to split them and do separate ORs on tile REGEXP per word, or
rewrite this one something like ".*(2000)|(leagus).*" perhaps, not sure if
grouping is suported
your statement will do just that, but make sure the field has no default
value and allows NULL
- Original Message -
From: "Bill2" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 1:48 PM
Subject: can you insert null?
> Hello all,
>
> Does anyone know if you can p
was the field type varchar? because it seems that no default varchars set
the NULL or (NULL) as a literal "(NULL)" not a binary 0 for some reason.
- Original Message -
From: <[EMAIL PROTECTED]>
To: "danchik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
ored
value was NULL
- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "danchik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 2:31 PM
Subject: Re: can you insert null?
> At 14:20 -0700 6/26/03, danchik wrote:
10 matches
Mail list logo