I have a module which extends Magento API (SOAP). I make the call using an external file and everything is fine. When the same call comes from another system (the extension for API is for a mobile app) then I get

SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

and I don't have any idea what the problem is. This is how I call my method:

$result = $client->call($session_id, 'customer.login', array(
    'website'   => 'base',
    'email'     => '[email protected]',
    'password'  => '123456'

Can someone tell what should I verify?

1 Answer 1


On the server side, enable sql logging (ideally only your API call should run against that server, in order to debug):

In Varien_Db_Adapter_Pdo_Mysql



protected $_debug               = true;
protected $_logAllQueries       = true;

and (if nor already there) create the folder defined in

protected $_debugFile           = 'var/debug/sql.txt';

Run the API call then have a look at the log file and see what queries ran and why it gives an error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.