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 $Db->update() method #4

Open
gilbertdim opened this issue Jun 10, 2021 · 0 comments
Open

Bug $Db->update() method #4

gilbertdim opened this issue Jun 10, 2021 · 0 comments

Comments

@gilbertdim
Copy link

I encounter an error while using the update() function.

When you execute

$DB->table('table')->where('id', 1)->getQuery('update', [ 'name' => 'table_name' ]);

The function will return

UPDATE `table` SET `name` = name WHERE `id` = 'table_name'

That will throw an error;

Fatal error: Uncaught Error: Wrong parameters for Requtize\QueryBuilder\Exception\QueryExecutionFailException([string $message [, long $code [, Throwable $previous = NULL]]]) in /media/sf_htdocs/candyfactory/vendor/requtize/query-builder/src/QueryBuilder/QueryBuilder/QueryBuilder.php:815 Stack trace: #0 /media/sf_htdocs/candyfactory/vendor/requtize/query-builder/src/QueryBuilder/QueryBuilder/QueryBuilder.php(815): Exception->__construct() #1 /media/sf_htdocs/candyfactory/vendor/requtize/query-builder/src/QueryBuilder/QueryBuilder/QueryBuilder.php(462): Requtize\QueryBuilder\QueryBuilder\QueryBuilder->prepareAndExecute() #2 /media/sf_htdocs/candyfactory/src/register/index.php(27): Requtize\QueryBuilder\QueryBuilder\QueryBuilder->update() #3 {main} thrown in /media/sf_htdocs/candyfactory/vendor/requtize/query-builder/src/QueryBuilder/QueryBuilder/QueryBuilder.php on line 815

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