MySQL Left Join Code

I know just enough php to be dangerous. Okay, well I’ve probably been “dangerous” for a while now. As I get more into this MySQL normalization junk, I can see where I’m going to need more and more MySQL Left Join thingies all the time. So, for my own benefit, here is aMySQL Left Join example.

$query = "SELECT refund.purchaseid, purchase.SellerID, purchase.BuyerID FROM refund LEFT JOIN purchase ". " ON refund.purchaseid=purchase.ID WHERE ($time > (refund.requesttime + 259200)) and refund.status1=1 and refund.sent=1";

Leave a Reply

You must be logged in to post a comment.