A phone number database

Recently I have been working on phone number assignment for the Asterisk system being put in place at PSU. The project wasn’t entirely that difficult, but I did learn som fun new tricks with it. One neat thing that I learned was how to combine the array_merge() function in php with the range function. Since I was assigning a lot of numbers, I needed a more efficient way to generate them than just a stadard for-loop.  An example of a query like this might be: $numbers = array_merge(range(1000, 1999), range(4000, 9999)). I was also able to practice using the useful php function implode. If you don’t know what this is, it is a useful tool for breaking arrays into strings for things like inserting them into databases. Very useful in my case when loading thousands of numbers. Some of the other things I learned on this project entailed working independently on a real project as well as working with a deadline. The two people I was primarily reporting to were on vacation while I worked on this project, and it was due while they were still gone. It actually felt nice to be doing something “real” here at my job where I am the one being counted on.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: