File: example.php

Recommend this page to a friend!
  Classes of Amin Alizade  >  PHP Search Database  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: PHP Search Database
Generate SQL to search table records for keywords
Author: By
Last change: -
Date: 7 years ago
Size: 682 bytes


Class file image Download

= new Search();
$order_column = "column1";
$order_type = "desc";
$offset = 100;
$limit = 150;

$my_search->set_terms("search term");


/* Above line returns:

FROM my_table
WHERE (column1 LIKE '%search%term%' OR column2 LIKE '%search%term%' OR column3 LIKE '%search%term%')
AND (column5 IN ('filter1','filter2'))
ORDER BY column1 desc
LIMIT 100,150


For more information send a message to info at phpclasses dot org.