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

Bug: Queries with LOWER( throwing errors #4443

Closed
lonnieezell opened this issue Mar 17, 2021 · 2 comments · Fixed by #4444
Closed

Bug: Queries with LOWER( throwing errors #4443

lonnieezell opened this issue Mar 17, 2021 · 2 comments · Fixed by #4444
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@lonnieezell
Copy link
Member

Using the latest develop branch, I am seeing a query that worked in 4.1 now fail.

Here's a test case that's failing with the error: SQLite3::query(): Unable to prepare statement: 1, unrecognized token: ":"

public function testWhereWithLower()
	{
		$this->db->table('job')
		         ->insert([
			         'name'        => 'Brewmaster',
			         'description' => null,
		         ]);

		$jobs = $this->db->table('job')
		                 ->where('LOWER(job.name)', 'brewmaster')
		                 ->get()
		                 ->getResult();

		$this->assertCount(1, $jobs);
	}
@lonnieezell lonnieezell added the bug Verified issues on the current code behavior or pull requests that will fix them label Mar 17, 2021
@lonnieezell
Copy link
Member Author

@paulbalandan I know you did some work on the setBinds method recently. Any ideas what might have changed on this?

@paulbalandan
Copy link
Member

Not sure what's the problem but the recent changes only to setBinds is how it stores the binds. Oh, also how it recognizes a named bind. I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants