
Sheldon Glickler - 2005-07-07 12:07:32
The class looks like exactly what I need. I do need a little education, however. So, if you could explain it to me, I would be appreciative.
1 - The class has a require of DB.php. There was none in the download.
Where can I find that one.
2 - It has the the syntax "$db =& DB::connect(DSN);" . What is the
"::"? What is the "DB"? Is this the "address of DB" and then some function?
3 - DSN was defined as
"define'DSN', 'pgsql://user@localhost/database');".
Can you explain the second argument? It look like a URL. How would I use it in my code?
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] ?
5 - Can the zipcode table simply be a table in my main database that I use for everything else? If so, what do I need to change, if anything?
These may seem like obvious questions to you, but it is questions like these that have blocked my using the PHPclasses stuff. It seem like an
exceptionally rich collection of material and this class, in particular, looks especially helpful.
Thanks,
Shelly