note 79435 added to ref.com

From: Date: Tue, 27 Nov 2007 15:08:46 +0000
Subject: note 79435 added to ref.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-132594@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 217.128.121.11 ---- Manual Page -- http://www.php.net/manual/en/ref.com.php Edit -- https://master.php.net/note/edit/79435 Del: integrated -- https://master.php.net/note/delete/79435/integrated Del: useless -- https://master.php.net/note/delete/79435/useless Del: bad code -- https://master.php.net/note/delete/79435/bad+code Del: spam -- https://master.php.net/note/delete/79435/spam Del: non-english -- https://master.php.net/note/delete/79435/non-english Del: in docs -- https://master.php.net/note/delete/79435/in+docs Del: other reasons-- https://master.php.net/note/delete/79435 Reject -- https://master.php.net/note/reject/79435 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132594) next »