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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -