We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I ahve the following code snippet:
->leftJoin('blocked_users', function($join) use ($user_id, $id) { $join->on('users.id', '=', 'blocked_users.blocked_user_id') ->where('blocked_users.user_id', '=', $user_id); })
which throws the errors
SQLSTATE[HY000]: General error: 2031 (SQL: select count(*) as aggregate from...
not sure if anyone else is experiencing this.
The text was updated successfully, but these errors were encountered:
Try to use Eloquent in a simpler way?
->leftJoin('blocked_users', 'blocked_users.blocked_user_id','=',$user_id)
And I don't think it is a problem of bllim/laravel4-datatables-package. I would suggest you check Laravel documentation for more details.
Sorry, something went wrong.
@CarterZhou If I run that it gives me an "Unknown Column" error as the last attribute needs to be a column name and not an actual value.
Though I think you are right I will need to re factor this to make it a little cleaner
Try it:
'options' => [ \PDO::ATTR_EMULATE_PREPARES => true ]
Put it on your database config if you are using mysql
No branches or pull requests
I ahve the following code snippet:
->leftJoin('blocked_users', function($join) use ($user_id, $id)
{
$join->on('users.id', '=', 'blocked_users.blocked_user_id')
->where('blocked_users.user_id', '=', $user_id);
})
which throws the errors
SQLSTATE[HY000]: General error: 2031 (SQL: select count(*) as aggregate from...
not sure if anyone else is experiencing this.
The text was updated successfully, but these errors were encountered: