php - SQL Array into Array based function -
default set up
$stream->settrack (array('cookie'));
trial
$sql = "select distinct text 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 takes written word , places array trial set should retrieve set of keywords mysql table array , insert them function.
it doesn't work. what's wrong?
public function settrack($trackwords) { $trackwords = ($trackwords === null) ? array() : $trackwords; sort($trackwords); // non-optimal, necessary if ($this->trackwords != $trackwords) { $this->filterchanged = true; } $this->trackwords = $trackwords; }
Comments
Post a Comment