2017 © Pedro Peláez
 

library easy-mysqli-fulltext

An easy-to-use Library to perform ranked MYSQLi fulltext searches

image

alexschwarz89/easy-mysqli-fulltext

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  • Monday, January 2, 2017
  • by alexschwarz89
  • Repository
  • 3 Watchers
  • 14 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

EasyMysqliFulltext

An easy-to-use Library to perform ranked fulltext searches with MYSQLi., (*1)

SensioLabsInsight Latest Stable Version License composer.lock GetBadges Game, (*2)

Install

Install via composer:, (*3)

{
    "require": {
        "alexschwarz89/EasyMysqliFulltext": "2.0.0"
    }
}

Run composer install., (*4)

Getting Started

You will find a example file in examples/index.php to use with the included testdata.sql., (*5)

Set up search on a existing MYSQLi connection

use \Alexschwarz89\EasyMysqliFulltext\Search;
$search = new Search( $mysqliInstance );

Simply searching for "example" in our testdata

$query = new SearchQuery($search);
$query->setTable('testdata')
    ->setSearchFields('description')
    ->mustInclude('example');

$search->setSearchQuery( $query );
try {
    $search->execute();
} catch (EmptySearchTermException $e) {
    // Handle invalid search terms
}

You can also

Use Search without an existing MYSQLi connection

$search = Search::createWithMYSQLi('localhost', 'username', 'password', 'dbname');

You can also pass the connection variables via Environment Variable (.env) and just Use

$search = Search::createWithMYSQLi();

.env file saved in your root directory

DATABASE_HOST=localhost
DATABASE_USERNAME=username
DATABASE_PASSWORD=password
DATABASE_NAME=database_name

Build more complex search queries

$query->setTable('testdata') 
    ->setSearchFields('description,title,isbn,author')
    ->mustInclude('example')
    ->canInclude('another')
    ->exclude('again')
    ->preferWithout('this')
    ->orderBy('some_field', 'ASC');

Contributing is surely allowed! :-), (*6)

The Versions

02/01 2017

dev-master

9999999-dev

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

23/07 2016

1.2.0

1.2.0.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

23/07 2016

dev-andela-iadeniyi-Environment_Setting

dev-andela-iadeniyi-Environment_Setting

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

26/04 2016

1.1.1

1.1.1.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

26/04 2016

1.1

1.1.0.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

30/05 2015

1.0.2

1.0.2.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

MIT

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

28/05 2015

1.0.1

1.0.1.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search

26/05 2015

1.0.0

1.0.0.0

An easy-to-use Library to perform ranked MYSQLi fulltext searches

  Sources   Download

The Requires

 

by Alex Schwarz

search mysqli fulltext fulltext search