function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike @ PartnersMike @ Partners 

'Greater then' or 'Less then' in PHP

Im trying to do a search on a objects created date, but only want ones after a certain time. It seems that the '<' or '>' symbols dont work. I keep getting 'unexpected char: 0xံFerror' when ever i use it. Any ideas on what i can use to have searches with 'greater then' or 'less then'?
Here is my code:

Code:
global $mySforceConnection;
  try{
  $xsdTime = strftime('%Y-%m-%dT%H:%M:%S',mktime(12, 0, 0, 1, 1, 2007));
  $SearchDate = $xsdTime;
  $query = "SELECT Id, CreatedDate, Account__c from BusinessDevelopment__c where CreatedDate < $SearchDate";
  $queryOptions = new QueryOptions(500);
  $response = $mySforceConnection->query(($query), $queryOptions);
  $response2 = $response->records;
  return $response2;
  }
  catch (Exception $e)
  {
$errors = $e->faultstring; echo $errors; }

Thanks,
Mike

Message Edited by Mike @ Partners on 02-05-2007 12:14 PM

adamgadamg
Hmm.. have you tested your query using the Eclipse Toolkit or Explorer?