Code Monkey home page Code Monkey logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
Add support for nested table joins.  This is a MySQL extension to the ANSI join 
syntax which is omitted.  Since the goal is full MySQL syntax support, this is 
an important enhancement request.

There are plenty of examples on the listed documentation page to use as test 
cases, as well as the example included in this report.

Original comment by [email protected] on 30 Apr 2011 at 4:46

  • Changed title: Support nested join operations in the FROM clause.
  • Changed state: Accepted
  • Added labels: Priority-High, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

from php-sql-parser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
Nested join support is checked in at revision 42:

SELECT *
    FROM (t1 LEFT JOIN t2 ON t1.a=t2.a)
         LEFT JOIN t3
         ON t2.b=t3.b OR t2.b IS NULL
Array
(
    [SELECT] => Array
        (
            [0] => Array
                (
                    [expr_type] => operator
                    [alias] => `*`
                    [base_expr] => *
                    [sub_tree] => 
                )

        )

    [FROM] => Array
        (
            [0] => Array
                (
                    [table] => (t1 LEFT JOIN t2 ON t1.a=t2.a)
                    [alias] => 
                    [join_type] => JOIN
                    [ref_type] => 
                    [ref_clause] => 
                    [base_expr] => t1 LEFT JOIN t2 ON t1.a=t2.a
                    [sub_tree] => Array
                        (
                            [0] => Array
                                (
                                    [table] => t1
                                    [alias] => t1
                                    [join_type] => JOIN
                                    [ref_type] => 
                                    [ref_clause] => 
                                    [base_expr] => 
                                    [sub_tree] => 
                                )

                            [1] => Array
                                (
                                    [table] =>  
                                    [alias] => t2
                                    [join_type] => LEFT 
                                    [ref_type] => ON
                                    [ref_clause] => t1.a=t2.a
                                    [base_expr] => 
                                    [sub_tree] => 
                                )

                        )

                )

            [1] => Array
                (
                    [table] => t3
                    [alias] => t3
                    [join_type] => LEFT 
                    [ref_type] => ON
                    [ref_clause] => t2.b=t3.b OR t2.b IS NULL
                    [base_expr] => 
                    [sub_tree] => 
                )

        )

)

t/nested.php is added to verify operation

Original comment by [email protected] on 2 May 2011 at 5:15

  • Changed state: Verified

from php-sql-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.