<?php
/*
This file is part of PHPOLL.
PHPOLL is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PHPOLL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PHPOLL; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
include "contest2007/config/config.php";
// assegno le variabili di connessione
$phpoll_db = mysql_connect ($phpoll_host, $phpoll_user, $phpoll_password)
or die ("Errore nella connessione a MySQL");
// selezione del database
mysql_select_db($phpoll_database, $phpoll_db)
or die ("Errore nella connessione al database ".$phpoll_database);
// QUERY per MySQL
$query = "SELECT * FROM ".$tab_voti." WHERE votato=1;";
$mysqlquery=mysql_query($query, $phpoll_db);
$totale = mysql_num_rows($mysqlquery);
print "totale = ".$totale;
mysql_close ($phpoll_db);
?>