Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Using CodeIgniter
General Help
BadMethodCall exception
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
BadMethodCall exception
richb201
Posting Freak
Posts:
1,004
Threads:
300
Joined:
Sep 2017
Reputation:
0
#1
08-16-2018, 06:30 AM
(This post was last modified: 08-16-2018, 06:32 AM by
richb201
.)
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_'
proof that an old dog can learn new tricks
Reply
InsiteFX
Super Moderator
Posts:
6,731
Threads:
345
Joined:
Oct 2014
Reputation:
246
#2
08-16-2018, 08:09 AM
It does not know what your query method is.
What did you Try?
What did you Get?
W
hat did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Reply
richb201
Posting Freak
Posts:
1,004
Threads:
300
Joined:
Sep 2017
Reputation:
0
#3
08-16-2018, 08:44 AM
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
richb201
Posting Freak
Posts:
1,004
Threads:
300
Joined:
Sep 2017
Reputation:
0
#4
08-19-2018, 05:56 PM
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
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB