You are here:  » Multiple installations in 1 database different Prefixes


Multiple installations in 1 database different Prefixes

Submitted by mikecdprice on Thu, 2014-11-20 20:54 in

Hello David,

I installed multiple installations of PT on the same database using different _prefixes.

How can a client search all of them if they want to, to search main and all the prefixes with PT installations?

Thank you

Submitted by support on Fri, 2014-11-21 09:12

Hello Mike,

Are the installations in separate sub-directories and you would like to search from the top level into each sub-directory? I have all the code for this approach in the form of a top level;

/sitesearchconfig.php
/sitesearch.php

In sitesearchconfig.php you simply maintain an array of each of the /subdirectory/ installations and their "friendly" name e.g. "Home Electronics" = "/electronics/" and then sitesearch.php takes a query, loops through each of the installations and displays the number of results in each, as a link to the actual results in that installation.

Drop me an email if that would work in your scenario, attaching search.php from one of the installations (as this will form the main bulk of sitesearch.php) and I'll forward the files for you to try...

Cheers,
David.
--
PriceTapestry.com