try adding some debug code to the statement execution
$query=mysql_query ($sql, $connessione) or die (error is .mysql_error());
to get an error message that can help debug the query
bastien
From: Marco Strullato [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] mysql not valid
Marco,
Have you tried echoing out the sql statement to the browser before it gets
sent to the database? That would show you the exact query string and give
you a chance to see where the error might reside.
$sql=select distinct des_riga, count ( des_riga ) as freq from k_riga
where id_tabella= .
A thought - if he's getting the 'not a valid resource' from just the
code he posted, then his problem is with the $connessione variable, and
not the query itself. Check to make sure the connection is up at
all/etc. and *it* is a valid resource. Generally (well, in the simple
case - which is