Re: Lookup record with same id and match it's status

2009-01-11 Thread Baron Schwartz
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.

Re: Lookup tables

2008-08-01 Thread Perrin Harkins
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

Re: Lookup tables

2008-08-01 Thread Rudolf Lippan
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

Re: Lookup tables

2008-07-31 Thread Perrin Harkins
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

Re: Lookup Table Question...

2006-08-10 Thread Dan Buettner
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.

Re: lookup tables, populating automatically

2004-05-19 Thread SGreen
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,

Re: Lookup used Version of MySql && MySql Foreign Keys and Referencial Integrity

2003-06-29 Thread Roman Neuhauser
# [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

RE: LOOKUP

2002-04-18 Thread Gordon
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

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
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

RE: LOOKUP

2002-04-17 Thread Gurhan Ozen
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

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
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

RE: LOOKUP

2002-04-17 Thread Gurhan Ozen
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

RE: LOOKUP

2002-04-17 Thread Andrew Hazen
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

Re: Lookup tables and indexing

2002-03-02 Thread Jeff Kilbride
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

Re: Lookup tables and indexing

2002-03-02 Thread Jeremy Zawodny
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

Re: Lookup tables and indexing

2002-03-01 Thread Egor Egorov
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

Re: Lookup tables and indexing

2002-02-28 Thread Jeff Kilbride
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