Progress on hills database.

 

Working on the site again, and I added a neat little picture that shows when the page is busy.. to give the user feedback that something is happening.

I’ve created a new table that holds the hill classification data for each hill., and tests show that queries using the two tables in a join SQL statement run 7 times faster ( once I set up indexes ) Currently the site searches using a regular expression search on the Classification field. It’s not exactly slow but it was worth the effort I think to make the table.

I could perhaps make separate tables for each category of hill, which could probably done with an SQL command.. rather that hacking around in PHP now I have the new table …

I have also been playing about with PHP sessions. I realised that there is not a lot of point creating a session unless the  user has a login. Therefore I set up a neat little way to remember the selected columns using a cookie. Simply use Jquery to select the <option> tags and then encode a simply string with the ‘selected’ value of each , eg y for selected or else n. (“nynnynynnnnynnnnnnnnnnn ” ) This is stored in a cookie, and clicking the reset button sets it to a default. There is another function to read the cookies and again a Jquery one liner to set the <option> tags, Pretty neat and starting to really enjoy coding, well it works most of all 🙂

I think the functionality is pretty much all there now. I might change it so you can page through results though. I’ve email the Ordnance Survey to find out why my API key doesn’t work online, I want to have an OS map. Other that that it’s a case of tidying up the CSS and thinking about my next project !

 

facebooktwitterlinkedinrssfacebooktwitterlinkedinrss

Leave a Reply

Your email address will not be published. Required fields are marked *