Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
3 More Joins You Should Be Familiar With
Feb 08, 2016 @ 18:18:36

On the SitePoint PHP blog Zach Wallace shares more database wisdom with his readers introducing three more JOINs you should know in your development work.

There are many ways to JOIN data from two database tables and filter the information you require. Craig Buckler wrote a popular piece on understanding JOINs; namely INNER, LEFT, RIGHT, and FULL OUTER. This article is an extension of that one.

He starts with the data he'll be working with: customers and books, linked by a book_id column. He then quickly reviews some of the joins already discussed in the previous article (LEFT, RIGHT, OUTER, INNER) before getting into the newer, more powerful types:

  • LEFT JOIN with Exclusion
  • RIGHT JOIN with Exclusion
  • OUTER JOIN with Exclusions

He finishes the post with a few other thoughts about using WHERE clauses in JOINs, the CROSS JOIN and how the JOINs relate to each other in MySQL.

tagged: join database three list inner outer left exclusion advanced example tutorial

Link: http://www.sitepoint.com/3-more-joins-you-should-be-familiar-with/

Jacob Santos's Blog:
Don't Advocate Inner Classes
Aug 11, 2006 @ 12:38:43

Jacob Santos talks in this new blog post about something that, if added to PHP, just might be more trouble than it's worth - inner classes.

Inner Classes are contained in parent classes and offer a sort of namespace mechanism for the public and open private class data transfer for private subclasses.

The functionality is already available in other languages, but the question is whether it is needed in PHP. The short answer is no. With PHP execution model, it would further slow down and bloat PHP compilation.

He demonstrates their purpose with some simple examples but also gives the reasons why it would be a bad thing to try to include them, including the better choice of namespaces over inner classes.

tagged: inner classes advocate purpose namespaces choice inner classes advocate purpose namespaces choice

Link:

Jacob Santos's Blog:
Don't Advocate Inner Classes
Aug 11, 2006 @ 12:38:43

Jacob Santos talks in this new blog post about something that, if added to PHP, just might be more trouble than it's worth - inner classes.

Inner Classes are contained in parent classes and offer a sort of namespace mechanism for the public and open private class data transfer for private subclasses.

The functionality is already available in other languages, but the question is whether it is needed in PHP. The short answer is no. With PHP execution model, it would further slow down and bloat PHP compilation.

He demonstrates their purpose with some simple examples but also gives the reasons why it would be a bad thing to try to include them, including the better choice of namespaces over inner classes.

tagged: inner classes advocate purpose namespaces choice inner classes advocate purpose namespaces choice

Link:


Trending Topics: