• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BadMethodCall exception

#1
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_'
proof that an old dog can learn new tricks
Reply

#2
It does not know what your query method is.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
I will look it over more carefully this weekend. They just don't have too many PHP examples.....
proof that an old dog can learn new tricks
Reply

#4
fixed it. I reloaded the sdk and now I use directly from the

require 'vendor/aws.phar';
proof that an old dog can learn new tricks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.