All pastes #143408 Raw Edit

Someone

public php v1 · immutable
#143408 ·published 2006-08-22 01:13 UTC
rendered paste body
<?php116 	        /**117 	        * @access public118 	        * @param integer $iSiteID119 	        * @param array $lastInitials120 	        * @return array121 	        */122 	        function dbGetAthletesByLastInitials($iSiteID = 0, $lastInitials){123 	            global $conn;124 	125 	            $SQL = "select *126 	                            from athlete127 	                            where intactive=1 ";128 	129 	            if ($iSiteID) $SQL .= ' and intsiteid = ' . db::db_escape_string($iSiteID);130 	            131 	            if (sizeof($lastInitials)) {132 	                $SQL .= ' and (';133 	                foreach ($lastInitials as $li) {134 	                    $SQL .= " vchlastname ilike '$li%' OR";135 	                }136 	                $SQL .= ' 1=0)';137 	            }138 	139 	            $SQL .= ' order by vchlastname, vchfirstname';140 	            return db::db_query($SQL, $conn);141 	142 	        } // end dbGetNameList?>