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

MySqlGrammar #69

Open
Arrig0 opened this issue Feb 18, 2020 · 0 comments
Open

MySqlGrammar #69

Arrig0 opened this issue Feb 18, 2020 · 0 comments

Comments

@Arrig0
Copy link

Arrig0 commented Feb 18, 2020

Hello,
first thanks for wp-eloquent, a very useful wrapper!

I want to ask you if there is any particular reason that hasn't allowed you to use MySqlGrammar (instead of Grammar base class).

By doing a couple of quick tests I noticed that using MySqlGrammar as Grammar
use Illuminate\Database\Query\Grammars\MySqlGrammar as Grammar;
and commenting in Database:: bind_params
$ query = str_replace ('"', '', $ query);`
which generates wrong sql for json statements (due to the quotes) you could use Laravel's JSON Where clauses

For example:
Social::where ('meta->facebook->account->email', '[email protected]')->get ();

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