You need to use a join. Specifically, a left outer join. I won't
explain this in great detail; figuring out how this works can be your
research topic ;) but try this:
select a.id, a.from, a.to, a.message, a.insertdate, b.insertdate
from messages as a
left outer join messages as b on a.id = b.
On Fri, Aug 1, 2008 at 7:32 AM, Rudolf Lippan <[EMAIL PROTECTED]> wrote:
> How would you get duplicated data? In one case you have an integer
> and in the other you have the value, but you still have to store one token
> of information with the row.
I meant in the case of storing the value di
On Thu, 31 Jul 2008 13:57:07 -0400, "Perrin Harkins" <[EMAIL PROTECTED]>
wrote:
> On Thu, Jul 31, 2008 at 12:59 PM, Chris W <[EMAIL PROTECTED]> wrote:
>> So my question is, is doing that way better than making the query more
>> complex with all the joins?
>
> If by "better" you mean "faster" the
On Thu, Jul 31, 2008 at 12:59 PM, Chris W <[EMAIL PROTECTED]> wrote:
> So my question is, is doing that way better than making the query more
> complex with all the joins?
If by "better" you mean "faster" then yes, it probably is marginally
faster. It would be simpler to just use the actual value
Mark, can you provide a sample of a query you're currently using to
retrieve data from this table / joining on this table?
Also, how big is this table? It may not be worth your time to change
things around as this is a very simple structure and should remain
speedy even if it grows pretty large.
Taylor,
You seem to be confusing your user interface with your database. You can
use a variety of techniques to get data from a user via a web page. The
exact methods available to you are dependent on your platform (the web
server and its operating system) and your processing language( ASP, PHP,
# [EMAIL PROTECTED] / 2003-06-28 16:56:13 +0200:
> I use mySQL on HP/UX 11.i - unfortunateley I am unable to lookup the
> used version. What is the command to do that? (according to mysql.info
> it is Version 3.23.42. )
SELECT VERSION();
--
If you cc me or remove the list(s) completely I'll
gt; From: Andrew Hazen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 2:40 PM
> To: 'Gurhan Ozen'; [EMAIL PROTECTED]
> Subject: RE: LOOKUP
>
> Good point. Also, how would you capture the current enum list to add
or
> substract from? Might have to hold
17, 2002 3:32 PM
To: Andrew Hazen; [EMAIL PROTECTED]
Subject: RE: LOOKUP
Hi,
Your solution would work if the set of the values you'll get from one
table
is primary key.. If it is not a primary key, i.e. allowing duplicate
values,
then everytime there is an insertion to the table you will ha
ginal Message-
From: Andrew Hazen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 1:58 PM
To: 'Gurhan Ozen'; 'Simon Tienery'; [EMAIL PROTECTED]
Subject: RE: LOOKUP
That's what I thought too. A workaround occurs to me though, but I'm
not sure if it would
27;Simon Tienery'; [EMAIL PROTECTED]
Subject: RE: LOOKUP
Ugh, I am being too goofy today..
Simon, the answer to the question is no, you can't do that in MySQL.
You can, however, create a column with enum datatype and define set of
valid
values.
In a case where you try to insert an inva
or it.
Sincerely,
Gurhan
-Original Message-
From: Andrew Hazen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 12:54 PM
To: 'Gurhan Ozen'; 'Simon Tienery'; [EMAIL PROTECTED]
Subject: RE: LOOKUP
Gurhan,
I think Simon was looking for a way to make the enum d
Gurhan,
I think Simon was looking for a way to make the enum dynamic from
another table. ??
Andrew Hazen
-Original Message-
From: Gurhan Ozen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 10:22 AM
To: Simon Tienery; [EMAIL PROTECTED]
Subject: RE: LOOKUP
Hi ..
You
ED]>
To: "Jeff Kilbride" <[EMAIL PROTECTED]>
Cc: "MySQL" <[EMAIL PROTECTED]>
Sent: Saturday, March 02, 2002 7:19 PM
Subject: Re: Lookup tables and indexing
> On Wed, Feb 27, 2002 at 09:14:51PM -0800, Jeff Kilbride wrote:
> >
> > Is there a rule
On Wed, Feb 27, 2002 at 09:14:51PM -0800, Jeff Kilbride wrote:
>
> Is there a rule of thumb for small tables and whether they should be
> indexed? I have several small, two column lookup tables with few
> rows (100-300) and some very small tables (< 10 rows). I don't plan
> on indexing the very sm
Jeff,
Friday, March 01, 2002, 12:05:36 AM, you wrote:
JK> Thanks for the reply. Does it actually hurt to index them on lower volumes
JK> of traffic? Or is it neglible?
Just try and you'll see, it really depends on your context.
JK> --jeff
>> Jeff,
>> Thursday, February 28, 2002, 7:14:51 AM, y
Hi Egor,
Thanks for the reply. Does it actually hurt to index them on lower volumes
of traffic? Or is it neglible?
--jeff
- Original Message -
From: "Egor Egorov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 8:40 AM
Subject: Lookup tables and indexing
17 matches
Mail list logo