Default Set Up
$stream->setTrack (array('cookie'));
Trial
$sql = "SELECT DISTINCT text FROM keywords"; $query = mysql_query($sql) or die($sql . ' - ' . mysql_error());
$keys = array();
while ($row = mysql_fetch_array($query)) {
$keys[] = $row[0];
}$stream->setTrack ($keys);
The default set up takes the written word and places it into an array The trial set up should retrieve a set of keywords from a mysql table as an array and insert them into the function.
It doesn't work. What's wrong?
public function setTrack($trackWords)
{
$trackWords = ($trackWords === NULL) ? array() : $trackWords;
sort($trackWords); // Non-optimal, but necessary
if ($this->trackWords != $trackWords) {
$this->filterChanged = TRUE;
}
$this->trackWords = $trackWords;
}