Skip to content

Instantly share code, notes, and snippets.

@Nathan-Srivi
Created September 25, 2014 12:46
Show Gist options
  • Save Nathan-Srivi/3b00e12a07b048e8b35a to your computer and use it in GitHub Desktop.
Save Nathan-Srivi/3b00e12a07b048e8b35a to your computer and use it in GitHub Desktop.
working & Error codes when import records into prediction io
<?php
$k = array(121,124,126,128);//my product ids.. I need to pass this type of ids
foreach($k as $productid)
{
$client->execute($client->getCommand('record_action_on_item', array('pio_action' => 'view', 'pio_iid' => $productid)));
}
?>
<?php
//working code
for($k=1;$k<10;$k++)
{
$client->execute($client->getCommand('record_action_on_item', array('pio_action' => 'view', 'pio_iid' => $k)));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment