Skip to content

Commit ffd05eb

Browse files
committed
Extend example to show Lookup by pattern
1 parent 5bbec2b commit ffd05eb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

remoting_client/examples/mail_user_get.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717
//* Set the function parameters.
1818
$mailuser_id = 1;
1919

20-
$app = $client->mail_user_get($session_id, $mailuser_id);
20+
// Lookup by primary key, gets back a single record.
21+
$mail_user = $client->mail_user_get($session_id, $mailuser_id);
22+
print_r($mail_user);
2123

22-
print_r($app);
24+
// Lookup by pattern gives an array of records.
25+
$mail_users_array = $client->mail_user_get($session_id, array('email' => '%@example.com'));
26+
print_r($mail_user_array);
2327

2428
if($client->logout($session_id)) {
2529
echo 'Logged out.<br />';

0 commit comments

Comments
 (0)