$advsearch = new sotf_AdvSearch($SQLquery); //create search object object with this array } else { $advsearch = new sotf_AdvSearch(); //create new search object object $SQLquery = $advsearch->Deserialize($SQLquerySerial); //deserialize the content of the hidden field } if ($SQLquery == NULL) { $advsearch->SetSortOrder(); } //set DEFAULT sort order for new queries if (isset($sort1) and isset($sort2)) { $advsearch->SetSortOrder($sort1, $sort2); //set sort order $advsearch->setDir($dir1, $dir2); //set sort order direction } $max = count($SQLeq); $k = 0; for ($i = 0; $i < $max; $i++) { $SQLquery[$i][2] = $SQLeq[$i]; if ($SQLquery[$i][4] == "date") { $SQLquery[$i][3] = mktime(0, 0, 0, $SQLstring[$k + 1], $SQLstring[$k + 2], $SQLstring[$k]); // mktime(0,0,0,$month,$day,$year); $k += 2; } elseif ($SQLquery[$i][4] == "length") { $SQLquery[$i][3] = abs($SQLstring[$k]); } else { $SQLquery[$i][3] = $SQLstring[$k]; }