|
|||
|
Scusate la domanda...ma ? possibile che scrivendo questa query
Codice:
<?php
$db_host="....";
$db_user="...";
$db_password="...";
$db_database="....";
$connessione=mysql_connect($db_host,$db_user,$db_password) or die ("Errore nella connessione al Mysql:" . mysql_error());
mysql_select_db($db_database,$connessione) or die ("Errore nella selezione del db:" . mysql_error());
$count = "SELECT COUNT Id FROM nome_tabella" or die ("Errore nella selezione del db:" . mysql_error());
$ris=mysql_query($count,$connessione) or die ("Errore nella query:" . mysql_error());
$res_count = mysql_fetch_row($ris);
?>
Codice:
Errore nella query:Unknown column 'COUNT' in 'field list' |
|
|||
|
Prova cosi?:
Citazione:
|
|
|||
|
Ho provato e mi da questo errore
Codice:
Errore nella query:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(Id) FROM fotoaereeverticali' at line 1 |
|
|||
|
FAi cos?:
dopo "$count = "SELECT COUNT(Id) FROM nome_tabella" ;" aggiungi "echo $count;" Vedi il risultato a video e fai eseguira la query in phpmyadmin e vedi che errore ti d?. poi vediamo |
![]() |
| Strumenti discussione | |
| Modalità visualizzazione | |
|
|
Discussioni simili
|
||||
| Discussione | Autore discussione | Forum | Risposte | Ultimo messaggio |
| E' cambiato il comportamento delle SELECT ... LIKE ? | scorpio26 | PHP | 0 | 04-07-2006 16.52.26 |
| Problemi SELECT MySQL | Lunas | PHP | 2 | 13-06-2006 17.07.08 |
| SELECT...WERE ? | twin | PHP | 2 | 07-09-2004 14.19.56 |
| Men? scorrevole "select" | Blueman | HTML | 3 | 07-06-2003 17.49.17 |