Login   Register  
PHP Classes
elePHPant
Icontem

File: Usage_Example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Shoeb  >  Search Query Generator for MySQL Database  >  Usage_Example  >  Download  
File: Usage_Example
Role: Example script
Content type: text/plain
Description: this is the post submit part
Class: Search Query Generator for MySQL Database
Generate an SQL query for searching values
Author: By
Last change:
Date: 8 years ago
Size: 651 bytes
 

Contents

Class file image Download
<?
include ("generator.class.php");

//$array_holder  is an array with its keys as the column fields and the values those are posted by the user... you can add you table fields to this array and assign the value posted by the user. If the user did not select any option then the value should be "" i.e. <option value = ""> SELECT </option>
$array_holder = array();
$array_holder['type'] = $type;
$array_holder['bedroom'] = $bedrooms;
$array_holder['proj_tenant'] = $project;
$array_holder['area'] = $area;
$array_holder['range'] = $range;
$sql mysql_query(generator::guerygen("YOUR_MYSQL_TABLE_NAME_TO_PERFORM_SEARCH"$array_holder));
?>