Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Friday, June 8, 2012

Joins are for lazy people?


I recently had a discussion with another developer who claimed to me that JOINs (SQL) are useless. This is technically true but he added that using joins is less efficient than making several requests and link tables in the code (C# or Java).

Wednesday, May 9, 2012

Friday, February 10, 2012

PostGIS function to connect geometry LINE together?


(note: the_geom is a geometry value (TYPE: LINESTRING), in this case i random them for readability)

Friday, January 13, 2012

Replacing special characters like dots in javascript


I have a search query from the user and I want to process it before applying to browser. since I'm using SEO with htaccess and the search url looks like this : /search/[user query] I should do something to prevent user from doing naughty things.. :) Like searching ../include/conf.php which will result in giving away my configuration file. I want to process the query like removing spaces, removing dots(which will cause problems), commas,etc.

Format MySQL Select into Associative Array in CakePHP


I like how CakePHP automatically loops through the results of MySQL queries and formats them in a nice map for you.