description

MySQL table structure that we use in this script is useful to store details of a booking. You can add/edit/remove any of the fields and modify the search script to print and search your own custom made MySQL table.

The following fields are used in our MySQL table:

from_date - start date for the reservation - MySQL date field
to_date - end date for the reservation - MySQL date field
full_name - name of the person who made the reservation - MySQL varchar field
email - email address of the person who made the reservation - MySQL varchar field
city - city where reservation was made - MySQL varchar field

There are 3 ways to filter the data:
1) sing jQuery date picker you can filter the results by date range
2) a text box lets you search for name or email
3) using a drop down with all the available cities you can filter the results by city only

Please check the Demo page of our PHP MySQL search script to see it in action and also check installation instructions. If you have problems, need help or customization or have a suggestion for improvement please use the comments box below.

download

To download MySQL Table Search for FREE you need to login your account.

how to install

Follow these steps to run this free script

1) open database.sql and import all the MYSQL queries in your database.

2) edit config.php file and set MySQL login details to connect to your database

3) using your web browser open search.php page which will show the results from the database and will let you filter them
226 Comments to "MySQL Table Search"
  • keith

    keith

    April 27, 2012 at 23:22 pm

    How can you limit the number of records shown?

    At the minute there are 10 records, if I ad 20 more records I would have 30 records.

    I would like to show only 15 records then the system will go to page 2, where page 2 would only show 15 records and so on.


    For example: It would look like this: 1 - 2 - 3 - 4 > next

  • sudeep

    sudeep

    April 10, 2012 at 21:45 pm

    hey nice script dude, works fine with y website ...thnxxx

  • Robert Bumbery

    Robert Bumbery

    March 28, 2012 at 23:56 pm

    I'm unable download the "MySQL Table Search" script.

    • Sasho Valkanov

      Sasho Valkanov

      March 29, 2012 at 07:47 am

      what browser are you using? Do you see any error message? Script downloads just fine.

  • Mike

    Mike

    March 25, 2012 at 10:07 am

    Hi,

    I am successfully using the MySQL table search with the drop menu to filter results. Love it. Can anyone help me tie in a second drop down menu to filter by name AND city??

    So far I have only declared a variable for the full_name field. What to do with the rest of the code????


    if ($_REQUEST["city"]<>'') {
    $search_city = " AND city='".mysql_real_escape_string($_REQUEST["city"])."'";
    }
    if ($_REQUEST["full_name"]<>'') {
    $search_city = " AND full_name='".mysql_real_escape_string($_REQUEST["full_name"])."'";
    }

    if ($_REQUEST["from"]<>'') {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE from_date >= '".mysql_real_escape_string($_REQUEST["from"])."'".$search_string.$search_city;
    } else if ($_REQUEST["to"]<>'') {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE to_date <= '".mysql_real_escape_string($_REQUEST["to"])."'".$search_string.$search_city;
    } else {
    $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE id>0".$search_string.$search_city;
    }

  • Sasho Valkanov

    Sasho Valkanov

    March 20, 2012 at 21:04 pm

    Sorry about that. Should be able to download it fine now.

  • Sharon Collins

    Sharon Collins

    March 20, 2012 at 20:34 pm

    I'm so excited about this. However, I did the download and got and index.php file that has no code or anything with it. I tried to download again but I get the message "You can download 1 PHP script per day". I'm sure I did something wrong I just don't know what. Help!

  • MAX REGON

    MAX REGON

    March 20, 2012 at 19:37 pm

    the php index file appears empty
    will try again

  • Joe Sager

    Joe Sager

    March 20, 2012 at 17:31 pm

    I'm unable download the "MySQL Table Search" script.

prev

Add your comment

Captcha