View Single Post
Old 09-30-2003, 08:12 PM  
Mortimer
Confirmed User
 
Join Date: Oct 2002
Location: Where the hell am I now?
Posts: 153
Quote:
Originally posted by magnatique


uhm, that would work if there was only 1 row with the same 'code' cell in the votes table...

but, it's more than that...


if there's 3 surfers that would vote, then it'll have

jenny01 | 111.111.111.111
jenny01 | 125.125.125.125
jenny01 | 142.142.142.142


see what I mean?
then you need to add the following:

SELECT update_info.code, update_info.collection, update_info.short_name, UNIX_TIMESTAMP(update_info.date_start) AS date_start, update_info.total_votes, update_info.total_score, votes.ip_address
FROM update_info
LEFT JOIN votes ON votes.code = update_info.code
WHERE date_start < now( ) AND votes.ip_address = '24.201.235.105'
ORDER BY date_start DESC
LIMIT 2 , 2;
__________________
The wiseman owns little but knows much, while the fool knows little but owns much
Mortimer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote