Jump to content

Search the Community

Showing results for tags 'left join'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Hi all, I have a table of a schedule of workers at kiosks and I have a table of drivers who drop them off and possibly a different driver picks them up. I have a view that lists other details from other tables (like times, dates, names) and I'd like to list the drop off and pickup drivers separately, because they might be different. I've tried a couple of things and got error messages - like 'referencing same table' when I tried this: create view allScheduleInfo AS ..... schedule.dropOffID, drivers.dropOffName, schedule.pickUpID, drivers.pickUpName, .... FROM schedule left join ..... left join drivers ON schedule.dropOffID = drivers.driverID left join drivers ON schedule.pickUpID = drivers.driverID .... I got it to display the view with an error message when I tried combining the joins on one line, like this --> left join drivers on schedule.dropOffID = driversID AND schedule.pickUpID = driversID And the dropOffID and pickUpID go thru correctly, but it makes the dropOffName and the pickUpName = to NULL. I considered making two separate tables for drop off and pick up drivers, but wouldn't that contradict the normalizing of table data? I know this may be kind of odd, and i hope I've explained it sufficiently that some one can point me in the right direction of how to do this. Basically I guess I am trying to access 2 pieces of information from the same table, but with different pointers to them. Thank you for your help.
  2. i need to connect team1 and team2 to a table called sports so i can get there names which is in column called (teams) how do i do that i already connected sports to another table as u can see in the code, how do i go about this, thanks. $query = "SELECT s.team_id, s.teams, a.current_bid, a.current_bid_id, a.id, a.team1, a.title, a.team2, a.ends, a.starts, u.nick, b.bid, b.tagged, b.bidder, b.willwin, b.quantity, p.bid As proxybid, b.id As bid_id FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "proxybid p ON (p.itemid = b.auction AND p.userid = b.bidder) LEFT JOIN " . $DBPrefix . "sports s ON (s.team_id = b.willwin) LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction) LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.tagged)
×
×
  • Create New...