← Back to team overview

mvhub-dev team mailing list archive

[Merge] lp:~priya/mvhub/move_sql_lib_headings into lp:mvhub

 

Priya Ravindran has proposed merging lp:~priya/mvhub/move_sql_lib_headings into lp:mvhub.

Requested reviews:
  MVHub devs with commit rights (mvhub-commit)


MOved sql query from Headings.pm to sql_select.lib
-- 
https://code.launchpad.net/~priya/mvhub/move_sql_lib_headings/+merge/24240
Your team MVHub Developers is subscribed to branch lp:mvhub.
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/links.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/links.shtml	2010-04-06 20:52:15 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/links.shtml	2010-04-27 16:58:15 +0000
@@ -1,7 +1,8 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML>
 <HEAD>
-<TITLE>Contact Us</TITLE><!-- start head.inc --><!-- mvhub/mvh//inc/head.inc -->
+<TITLE>Directories of Social Services for Massachusetts North Shore</TITLE>
+
 
 <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type><LINK 
 rel="shortcut icon" href="/favicon.ico"><!-- cosmetic script to reset columns to equal lengths-->
@@ -35,11 +36,14 @@
 
 <P><A href="http://www.mvhub.com";>MVHub</A><br>
 Our other website, MVHub provides a directory of social services for the 
-Merrimack Valley region.</P>
+Merrimack Valley region, in Massachusetts.</P>
 <P><A href="http://www.mass211.org";>Mass 211</A><br>
 A phone service and online directory run by the United Way. It connects 
-people seeking services to the appropriate organization or government agency. </P>
+people seeking services to the Massachusetts' organizations or government agencies. </P>
 
+<P><A href="http://eccf.org/nonprofitdirectory113.html";>ECCF Nonprofit Directory</A><br>
+Essex Count Community Foundation's Directory of Non-Profits in Essex County Massachusetts, including the North Shore.
+</P>
 
 
 </DIV><!-- id=innertube --></DIV><!-- id='contentcolumn' --></DIV><!-- id='contentwrapper' -->

=== modified file 'app-mvhub/conf/sql_select.lib'
--- app-mvhub/conf/sql_select.lib	2010-04-15 17:42:46 +0000
+++ app-mvhub/conf/sql_select.lib	2010-04-27 16:58:15 +0000
@@ -114,6 +114,16 @@
 WHERE 
   agency_id = ?
 
+[CATEGORY_HEADING_CATEGORY_X_FETCH_HEADING_CATEGORY]
+SELECT
+   h.heading_name, c.category_id, c.category_name 
+FROM 
+  category c, heading_category h 
+WHERE 
+  h.category_id = c.category_id 
+ORDER BY 
+  h.heading_name, c.category_name
+
 [CATEGORY_PROGRAM_VIEW_HEADING_CATEGORY_X_ID_NAME_COUNT]
 SELECT
   c.category_id, c.category_name, c.program_count

=== modified file 'lib-mvhub/lib/MVHub/Headings.pm'
--- lib-mvhub/lib/MVHub/Headings.pm	2009-12-07 20:00:37 +0000
+++ lib-mvhub/lib/MVHub/Headings.pm	2010-04-27 16:58:15 +0000
@@ -76,13 +76,9 @@
 # }
 sub _fetch_heading_categories {
 
-    my $dbh = MVHub::Utils::DB::get_dbh();
+    my $dbh = MVHub::Utils::DB::get_sql_select_statement();
 
-    my $stmt
-        = "SELECT h.heading_name, c.category_id, c.category_name "
-        . "FROM category c, heading_category h "
-        . "WHERE h.category_id = c.category_id "
-        . "ORDER BY h.heading_name, c.category_name ";
+    my $stmt = 'CATEGORY_HEADING_CATEGORY_X_FETCH_HEADING_CATEGORY';
 
     my $rows_aref = $dbh->selectall_arrayref( $stmt, { Slice => {} } );
 


Follow ups