Jump to content

Archived

This topic is now archived and is closed to further replies.

zsxdcfv21

mysql syntax

Recommended Posts

whats the correct way to write this one :

$q = "SELECT n.BuyerNoteID,
n.Note,
date_format(n.Created, '%d %b %y')
FROM BuyerNote n
LEFT JOIN (Buyer b)
ON (b.BuyerID = n.BuyerID
AND b.BuyerID = '{$_GET['BuyerID']}')
LEFT JOIN (User u)
ON (b.UserID = u.UserID)
";

Share this post


Link to post
Share on other sites
Do you want to

a ) list buyers even if they have no buyerNote or user records
b ) list buyerNotes even if they have no buyer  or userrecord
c ) list only those where there is a match in buyer and buyerNote but not user tables?

etc etc

In other words, we don't know what is correct if we don't jnow what you want to achieve

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.