Forum Moderators: open

Message Too Old, No Replies

employee directory - .CSV extract

         

slimrob

7:49 pm on Mar 14, 2007 (gmt 0)

10+ Year Member



Hello wonderful helpful people:)
I'm new to web development. I'm pretty familiar with html and css, but that's about as far as I've gotten over the last 8 months. I've been tasked with creating an employee directory on the intranet that I manage. The source for the data will be an extract from our HR system in .CSV format. It will need to look professional. You know, the typical layout where you click on a letter and will show you all the last names that start with that letter. Or, you can search for their name specifically. Does anybody know of any software or tool I can use to accomplish this? I hope I posted this in the correct section. You guys have been very helpful in the past. Thanks again!

mcibor

12:38 pm on Mar 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would do that in two scripts:
One script that extracts data from csv and puts it into database, eg. mySQL
Other script to retrieve the data.
You can combine it with rss feeds or ajax (as google mail) to narrow the search down.

I presume, that the db structure would be sth like:

id
name
surname
position
team
department
tel
mobile
fax
pager
...

I myself added also a field search where I store doubled data separated by space, and only in that field I search for

this will be in php:
$keywords = mysql_real_escape_string [php.net](str_replace [php.net](array(" ", "+", "*"), "%", $_POST['search']);
$sql = "SELECT * FROM `employees` WHERE search LIKE '%$keywords%'";

but you can also perform full text search.

Hope this helps you
Regards
Michal