BadMethodCall exception - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: BadMethodCall exception (/showthread.php?tid=71457) |
BadMethodCall exception - richb201 - 08-16-2018 when my code runs these lines: try { $result = $sdk->query([array( 'TableName' => $tableName, 'KeyConditionExpression' => 'campaign = _campaign and compare_date = : d_compare_date', 'ExpressionAttributeValues' => array( '_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_' RE: BadMethodCall exception - InsiteFX - 08-16-2018 It does not know what your query method is. RE: BadMethodCall exception - richb201 - 08-16-2018 I will look it over more carefully this weekend. They just don't have too many PHP examples..... RE: BadMethodCall exception - richb201 - 08-19-2018 fixed it. I reloaded the sdk and now I use directly from the require 'vendor/aws.phar'; |