CodeIgniter Forums

Full Version: BadMethodCall exception
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when my code runs these lines:


try {
   $result = $sdk->query([array(
       'TableName' => $tableName,
       'KeyConditionExpression' => 'campaign = Confused_campaign and compare_date = : d_compare_date',
       'ExpressionAttributeValues' => array(
           'Confused_campaign' => array('S' => $campaign),
           ':d_compare_date' => array('N' => $d)
       ),
   )]);


I am getting this error:

An uncaught Exception was encountered
Type: BadMethodCallException
Message: Unknown method: query.
Filename: C:\xampp\htdocs\sub_crud\vendor\aws\aws-sdk-php\src\Sdk.php
Line Number: 330
Backtrace:
File: C:\xampp\htdocs\sub_crud\application\controllers\Configure.php
Line: 1172
Function: __call

File: C:\xampp\htdocs\sub_crud\application\controllers\Configure.php
Line: 1172
Function: query

File: C:\xampp\htdocs\sub_crud\index.php
Line: 316
Function: require_once


At the top of my controller i have these lines:

use GuzzleHttp\Stream\Stream;   //for the s3 interface
use Aws\DynamoDb\Exception\DynamoDbException;
use Aws\DynamoDb\Marshaler;


How would I go about solving this? The faces are not in the actual code. It is ':ess_'
It does not know what your query method is.
I will look it over more carefully this weekend. They just don't have too many PHP examples.....
fixed it. I reloaded the sdk and now I use directly from the

require 'vendor/aws.phar';