this-> GetDBBayes

(Caronte Pcode version 2.0)

Description

CS_Bayes this->GetDBBayes (void);

Loads the database of the soul of the emails in a CS_Bayes class variable.

The CS_Bayes class has four CDB_Ram variables inside of it, LEARN , HAM, SPAM, NEUTRAL. Each record in a CDB_Ram variable have values separated by character 2.

Example.

Source:

#import( class , HashArray )
#import( class , CDB_Ram )
#import( class , CS_Bayes )

CS_ADMIN_SCRIPT this = new CS_ADMIN_SCRIPT($_this);

int Main(CAdminRequest pRequest, CAdminResponse pResponse)
{

CS_Bayes bayes = this->GetDBBayes();
CDB_Ram db = bayes->GetDBRam("LEARN");

HashArray indexkey = new HashArray();
db->Query(0,indexkey,0);

for (int i = 0; i < indexkey->GetRecordCount(); i++)
{

this->Print(indexkey->GetByIndexS(i));

}

delete indexkey;

return 0;

}




Out:
cristiano@inrete.com (separator) info@pistoianet.it (separator)