Re: [PHP] mysql joins

This is a discussion on Re: [PHP] mysql joins within the PHP General forums, part of the PHP Programming Forums category; ---- Steven Macintyre <steven@steven.macintyre.name> wrote: > I have three tables, namely; > > User > - UID &...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-25-2008
Wolf
 
Posts: n/a
Default Re: [PHP] mysql joins


---- Steven Macintyre <steven@steven.macintyre.name> wrote:
> I have three tables, namely;
>
> User
> - UID
> - Firstname
> - Surname
> - Tel
> - Cell
> - Email
>
> Tracker
> - UID
> - Points
>
> Winners
> - UID
> - Datetime (0000-00-00 00:00:00)
>
> I need to get the following information from the above tables (in my logical sense)
>
> All users from user with sum(points) as points and datetime > datetime + 14 days
>
> In English, the all users must be selected, excluding the ones that have won in the last 14 days and return all the information and the sum of points
>
> I suspect I would need to use joins here ... but have no clue how to do so ... I have read up a bit and can work out inner joins from three tables, but not coping with this problem above
>
> Can someone help me out with this please?
>
> Many thanks
>
> Steven


What PHP code have you written so far?

I personally would do a query on one table then use the results to grab the information from the other table. Some use joins, but I haven't seen a ton of time loss between the multi-short calls versus a join..
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0