Re: Re: RFC Postal Routing Package - example

From: Date: Wed, 22 Dec 2004 10:29:53 +0000
Subject: Re: Re: RFC Postal Routing Package - example
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35221@lists.php.net to get a copy of this message
Hi Daniel, Congrats. Couple of things: I'm getting an SQL error if I don't enter a house number: (*Warning*: sqlite_array_query() [function.sqlite-array-query <http://devel.webcluster.at/%7Edaniel/postrouting/function.sqlite-array-query>]: near "BETWEEN": syntax error in */home/daniel/public_html/postrouting/classes/ParcelRoute.php* on line *59)* I've only had a very quick look at the code. But is this going to be tied to sqllite, or will you be using DB or similar abstraction? Any chance of more 'human-readable' names for the _pathXn() methods? OK, they're private, but it'd help people writing drivers for other countries to keep straight exactly what they're doing. Be very careful to escape user input before feeding it to the DB - I'm not familiar enough with sqllite to know if it provides prepare() and placeholders. If it does, that's the way to go, if not DB::quote() would help. Can I use this to just enter the post code and retrieve the available address info (town, street and range of house numbers, ...)? Matt Daniel Khan wrote:
Hello Again, I now have set up most of the postal routing class we talked about and can now provide an example of what it does. http://devel.webcluster.at/~daniel/postrouting/ Type in a german address and it should create the postal routing data needed - I am also creating a barcode (using Image_Barcode) in this example. If no exact matching address is found the class tries rule out possible typos by cutting down the string or using soundex and metaphone. You also find the source code of the classes and the example. Please have a look. Greetings


« previous php.pear.dev (#35221) next »