Login   Register  
PHP Classes
elePHPant
Icontem

File: mysql.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Cesar D. Rodas  >  RodaSpell  >  mysql.php  >  Download  
File: mysql.php
Role: Example script
Content type: text/plain
Description: MySQL example
Class: RodaSpell
Correct text spelling using a SQL database
Author: By
Last change:
Date: 2006-03-04 13:16
Size: 542 bytes
 

Contents

Class file image Download
<?
include "rodaspell.php";
include 
"timer.php";

$spell = new RodaSpell;
$t = new Timer;

$spell->mysql true;
$spell->m_user "root";
$spell->m_pass "";
$spell->db "saddor"/* Database */

$spell->install() /* install */;

$spell->word_add("cesar");
$spell->word_add("zezar");
$spell->word_add("google");
$spell->word_add("microsoft");
$spell->word_add("php");


$t->start();
print_r($spell->correct("sesar trata de comprar mcrosoft"));
print 
"<br>Correction with MySQL: ".$t->get_time()." seconds <hr>";

?>