List:General Discussion« Previous MessageNext Message »
From:David McInnis Date:May 7 2002 8:10pm
Subject:RE: dates
View as plain text  
I would suggest doing "member = 43 and mh.date > ml.date" since there
could potentially be more records that meet the second criteria.  I
always try to optimize my queries to narrow my recordset as small as
possible before I apply any other criteria.  That said, MySQL may do
this sort of optimization internally.  (I would be curious to know from
more seasoned MySQL gurus if this is the case).

Oh, I see your problem, I think that you need to add "and ml.member =
mh.member"  If you do not already have this association, you will need
to create int.

David McInnis

-----Original Message-----
From: Sandeep Murphy [mailto:sandeep.murphy@stripped] 
Sent: Tuesday, May 07, 2002 12:07 PM
To: MySQL List
Subject: dates

hi,

I need to extract all the records from a table where the date of the
record
is later than the last time the user logged in...

my query reads like this...


select distinct mh.code,rubrica from multimedia_header mh, members_log
ml
where mh.date > ml.date and member =43

can anyone pl tell me whats wrong with it??

TIA,
sands

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread108268@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-david=dataovation.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Thread
datesSandeep Murphy7 May
  • RE: datesDavid McInnis7 May
    • Re: datesJeremy Zawodny8 May
RE: datesSandeep Murphy8 May
  • RE: datesDavid McInnis8 May
RE: datesSandeep Murphy8 May
  • RE: datesDavid McInnis8 May
RE: datesSandeep Murphy8 May