You are here: Re: Search by zip code « PHP Programming Language « IT news, forums, messages
Re: Search by zip code

Posted by Marcin Dobrucki on 07/07/05 17:13

Shelly wrote:
> 1 - That class has a require of DB.php. There was none in the download.
> Where can I find that one.

pear.php.net

> 2 - It has the the syntax "$db =& DB::connect(DSN);" . What is the
> "::"? What is the "DB"?
>
> 3 - DSN was defined as "define ('DSN', 'pgsql://user@localhost/database');".
> Can you explain the second argument? It look like a URL.

Its an URI, not URL. PEAR::DB can take an argument as either a hash,
or a URI. It means "connect to a postgresql db as "user", on machine
"localhost", and access database called "database".


> 4 - In using this class, do I simply create a variable with something like:
> $my_var = new ZipCodesRange(<the arguments>);
> and then access the zipcodes that satisfy as:
> $my_var->zipcodes[$i] ?

"new" will create a new instance from class ZipCodeRange

> 5 - Can the zipcode table simply be a table in my main database?

Sure. You can store just about any kind of information in a db ;-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация