Method Community

 

PHP SOAP - No cURL repsonese for strWhereClause

Last post 10-04-2013 2:10 PM by Method_David. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-30-2013 10:52 AM

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    PHP SOAP - No cURL repsonese for strWhereClause

    I have written a successful MethodAPISelect_XMLV2 query using 

    "<tem:strWhereClause>(TxnDate >= '2013-09-30')</tem:strWhereClause>".

    But when I use

    "<tem:strWhereClause>(TxnDate >= '2013-09-30' AND TxnDate <= '2013-10-06')</tem:strWhereClause>"

    instead, the cURL response is empty (no XML whatsoever).

    Am I writing the where clause correctly?  And why is there no error message?


    Thanks for any help you can give.

  • 09-30-2013 12:33 PM In reply to

    Re: PHP SOAP - No cURL repsonese for strWhereClause


    Hi viret56,

    2 things come to mind off the top of my head.

    1. Does your data actually have records in the date range?

    2. Try changing your dates to be YYYY-Mon-DD format,...namely TxnDate >= '2013-Sep-30' AND TxnDate <= '2013-oct-06' to avoid an ambiguity error and your enddate being read as jun 10, 2013

    Dave

  • 09-30-2013 4:56 PM In reply to

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    Re: PHP SOAP - No cURL repsonese for strWhereClause

    Dave,

    I have tried a data range which does return data.  When I use "<tem:strWhereClause>(TxnDate >= '2013-09-23')</tem:strWhereClause>", many record are retrieved. However, when I try to limit the search to one week with "<tem:strWhereClause>(TxnDate >= '2013-09-23') AND (TxnDate <= '2013-09-29')</tem:strWhereClause>", I not only get no records, I don't get any XML returned.  (When an empty set is returned I normally see XML like this:

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><MethodAPISelect_XMLV2Response xmlns="http://tempuri.org/"><MethodAPISelect_XMLV2Result><?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Success" MaxRecords= "False"><MethodIntegration /></MethodAPI></MethodAPISelect_XMLV2Result></MethodAPISelect_XMLV2Response></soap:Body></soap:Envelope>

    However, as I mentioned above, I am not even getting that.)

    I did try your second suggestions, with the same empty response.

    It seems like the where statement in question is causing Method to choke and return an empty reply.  Not false, just empty.

    Are there any know caveats to including TxnDate in where clauses?

    Thanks

  • 09-30-2013 5:19 PM In reply to

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    Re: PHP SOAP - No cURL repsonese for strWhereClause

    Dave,

    I need to add that I have used a where clause similar to the one above using the MethodAPI and Excel VBA.  So now I am wondering if PHP and cURL are the culprits.  Any ideas?

  • 10-04-2013 2:10 PM In reply to

    Re: PHP SOAP - No cURL repsonese for strWhereClause


    Hi viret56,

    Sorry about the delay long/rough week.

    I've tried to query using (TxnDate >= '2013-09-23') AND (TxnDate <= '2013-09-29') and it works fine for me.

    There was an an update a few days ago....can you check if the problem still occurs? If it does send me an email with your account name, and table you are trying to run this against (and don't forget to enable methodsupport) and I'll see if there is anything I can figure out.

     

    Dave

Page 1 of 1 (5 items)