RE: mysql not valid resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <marco.strullato@xxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  mysql not valid resource
Date: Tue, 9 Aug 2005 15:43:38 +0200

Hi all, I have a problem with mysql:
this code produce a not valid mysq resource.

$sql="select distinct des_riga, count ( des_riga ) as freq from k_riga
where id_tabella=" . $id_tabella . " and id_colonna=" . $id_colonna .
" group by des_riga order by des_riga";
$query=mysql_query ($sql, $connessione);

$id_tabella, $id_colonna and $connessione has the correct value...

The same query runs perfectly if I exec it directly on the db.

Do you have any suggestions?

Marco

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux