Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column comparation in where clause #11

Open
xStarman opened this issue Mar 6, 2019 · 0 comments
Open

Column comparation in where clause #11

xStarman opened this issue Mar 6, 2019 · 0 comments

Comments

@xStarman
Copy link

xStarman commented Mar 6, 2019

SQL = select * from t1 join t2 on (t1.column1 = t2.column1) where t1.column2 = t2.column2

EXPECTED = DB::table('t1')->join('t2', 't1.column1', '=','t2.column1' )->whereRaw('t1.column2 = t2.column2')

RESULT = DB::table('t1')->where('t2.column2', '=', '')->get()

PHP Notice: Undefined index: value in E:\dev\laravel_test\sql-to-builder-master\src\Converter\WhereConverter.php on line 52

*This is a simplified version of a large query that I tried to convert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant