Welcome Guest, Not a member yet? Register   Sign In
area.example.com - How to do Subdomains for Location-Based Database Filtering?
#2

[eluser]bretticus[/eluser]
You could probably combine your fruits table with 20k records. Or you could prefix your table names with the location and let the model decide which one to query based on the host header. Host header is really easy to get in PHP:

Code:
$host = $_SERVER['HTTP_HOST'];

I do not recommend allowing host header values into your queries. If your location base is large, than I recommend at least keeping a global array with all the possible combination and checking against it or going with a default location (or detect it again.)


Messages In This Thread
area.example.com - How to do Subdomains for Location-Based Database Filtering? - by El Forum - 08-11-2010, 01:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB