HOME NEWS REVIEWS ARTICLES MUSICIANS GUIDES PHOTOS FORUMS MOBILE RADIO
Welcome Site Map Shows Daily MP3s Videos Podcast Upcoming Releases Editorial Calendar Contests  
Advanced
Contact Us   |   Advertise   |   For Contributors   |   For Musicians
<%args> $results_page => 10 $search_type => 'album' $sort_type => '' $keywords => '' $page => 1 <%init> my $dbh = DBI->connect("DBI:mysql:allaboutjazz", 'vxweb', 'vx232web'); my ($id, $origfile, $album, $artist, $label, $author, $review, $pretty); my ($s_page, $e_page); $search_type = lc $search_type; $search_type = 'album' if not $search_type =~ /^(album|artist|author|label)$/; my $cnt_sql = "SELECT count(id) FROM cd_review WHERE MATCH($search_type) AGAINST(?)"; my $sth = $dbh->prepare($cnt_sql); $sth->execute($keywords); my ($total_cnt) = $sth->fetchrow_array(); $sth->finish(); my $sql = qq{ SELECT id, origfile, album, artist, label, author, review, DATE_FORMAT(date_published, '%M %e, %Y') As PrettyDate FROM cd_review WHERE MATCH($search_type) AGAINST(?) }; $sql .= " ORDER BY $sort_type " if $sort_type; $sql .= " LIMIT ?,?"; my $sth2 = $dbh->prepare($sql); my $offset = (($page-1) * $results_page) + 1; $sth2->execute($keywords, ($page * $results_page) - $results_page, $results_page); my $total_pages = int( $total_cnt / $results_page ); my $total_rpages = int ( $total_cnt % $results_page ); $total_pages++ if $total_rpages; $e_page = ($page eq $total_pages and $total_rpages) ? (($page-1) * $results_page) + $total_rpages : $page * $results_page; <%cleanup> $dbh->disconnect();





You've Got a Friend
Kevin Hays Trio
I'm in Heaven Tonight
Sarah DeLeo
Gettin' Blazed
Jermaine Landsberger
Mystique
Amaryllis Santiago
Euphrates, Me Jane
Bipolar
Plays Tribute to Oscar Peterson
Resonance Big Band
Advertise Here







.
AAJ CD Review Search

AAJ CD REVIEWS:   TODAY'S | THIS MONTH'S | MONTHLY ARCHIVE
Search By:
Keyword:
% if ($keywords) {
Sort By: Displaying Results Per Page
% }
% if ($keywords and not $total_cnt) { No Records Found!

% } % elsif ($keywords) { Search Results For: <% $keywords %>

Displaying Results <% $offset %> through <% $e_page %> of <% $total_cnt %>

<%perl> while ( ($id, $origfile, $album, $artist, $label, $author, $review, $pretty) = $sth2->fetchrow_array() ) { my $token; foreach $token (split /\s/, $keywords) { $album =~ s#($token)#$1#ig if $search_type =~ /album/i; $artist =~ s#($token)#$1#ig if $search_type =~ /artist/i; $author =~ s#($token)#$1#ig if $search_type =~ /author/i; $label =~ s#($token)#$1#ig if $search_type =~ /label/i; }

<% $album %>
    Artist: <% $artist %>
    Label: <% $label %>
    Author: <% $author %>
    Review Publish Date: <% $pretty %> % }

% if ($total_pages > 1 ) {



Result Page: % if ($page > 1) { Previous   % } % my $i=1; % for ($i=1;$i <= $total_pages; $i++) % { <% ($i != $page) ? "$i" : "$i" %> % } % if ($page < $total_pages) {   Next % } % }

% }


  Privacy Policy | Dedicated Servers All material copyright © 2009 All About Jazz and/or contributing writers/visual artists. All rights reserved.