note 79435 deleted from ref.com by danbrown

From: Date: Mon, 21 Dec 2009 17:02:49 +0000
Subject: note 79435 deleted from ref.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164194@lists.php.net to get a copy of this message
Note Submitter: neoray1 at caramail dot com ---- On exemple for use indexer there are an error, this correct code $searchstring="news"; $INDEXCATALOG="YourCatalogName"; $objIndexServer = new COM("ADODB.Connection") or die("Cannot start ADO"); $objIndexServer->Provider = "msidxs"; $objIndexServer->Open($INDEXCATALOG); $sql="SELECT DocTitle, VPath, Path, Filename, Access, HitCount, Rank " ."FROM SCOPE('DEEP TRAVERSAL OF \"d:\inetpub\intranet \"') " ."WHERE ((CONTAINS(' \"$searchstring\" ') >0) " ."AND ((Path NOT LIKE '%\_vti%') AND (Path NOT LIKE '%\_private%') " ."AND (Filename NOT LIKE 'search.php'))) ORDER BY Rank DESC"; $objRS = $objIndexServer->Execute("$sql"); # submit the query // while (!$rs->EOF) $rs not exist the really result is $objRS while (!$objRS->EOF) //create output { echo $objRS->Fields["DOCTITLE"]->value." -- " .$objRS->Fields["FILENAME"]->value." -- " .date("d.M.y",$objRS->Fields["ACCESS"]->value)." -- " .$objRS->Fields["HITCOUNT"]->value." -- " .($objRS->Fields["RANK"]->value/10)."% ----> " .$objRS->Fields["VPATH"]->value ."<br>"; $objRS->MoveNext(); } Thanks you at dirk_hahn for the good code

« previous php.notes (#164194) next »