The Code:
google.load('visualization', '1', {'packages':['table']});
function changeData(scorer) {
// Set the query using the parameter
var whereClause = "";
if(scorer) {
whereClause = " WHERE 'Scoring Team' = '" + scorer + "'";
}
var queryText = encodeURIComponent("SELECT 'Scoring Team', 'Receiving Team', 'Minute of goal' FROM 197026" + whereClause);
var query = new google.visualization.Query('http://www.google.com/fusiontables/gvizdata?tq=' + queryText);
//set the callback function
query.send(getData);
}
// Define callback function, this is called when the results are returned
function getData(response) {
// For more information on the response object, see the documentation
// http://code.google.com/apis/visualization/documentation/reference.html#QueryResponse
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(response.getDataTable(), {showRowNumber: true});
}