findSubscriber always returns 0

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

findSubscriber always returns 0

Postby dpommeranz » Tue Aug 12, 2008 12:07 pm

Hi Guys,

I am very impressed by the functionality of OpenEMM. But I have some problems withe the webservice functionality.

I created custom profile fields like the field "sec_import".
Now I want to delete all subscriber who have the value "xyz" in the field "sec_import" with the following php-code:

Code: Select all
do {
  $subscriberID = $service->findSubscriber('sec_import', 'xyz');
  $service->deleteSubscriber($subscriberID);
} while ($subscriberID > 0);


With a search on the email-address (but only without placeholders) the findSubscriber method returns the right ID. Why does the search on a custom field give me a wrong result?

Best Regards
dpommeranz
dpommeranz
 
Posts: 2
Joined: Tue Aug 12, 2008 11:58 am

Postby maschoff » Tue Aug 19, 2008 8:43 am

findSubscriber can not deliver an array of IDs but only a single value, so the value of the search column has to be unique. If more than one recipient holds the same value in the search column the method does not work.
OpenEMM Maintainer
maschoff
Site Admin
 
Posts: 1310
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Postby fnagel » Tue Feb 16, 2010 9:54 am

I think there is a mistake in the webservice documentation in the method-definition of the findSubscriber method:
"return 0 or customerID of the first match."

As you posted, the method doesn't work if more than one recipient holds the same value?

But is there any other way to get more then one subscriber, e.g. by gender or some other keyColumns with the webservice?
stay posi!
fnagel
 
Posts: 4
Joined: Tue Jan 12, 2010 5:35 pm
Location: Münster, Germany


Return to Using OpenEMM

Who is online

Users browsing this forum: No registered users and 0 guests