Ho gia letto sul forum ma non sono riuscito a realizzare nulla,
io ho una tabella news mi serve poter stampare anche solo il valore dell'ulimo id inserito in quella tabella, come faccio?
grazie
Ho gia letto sul forum ma non sono riuscito a realizzare nulla,
io ho una tabella news mi serve poter stampare anche solo il valore dell'ulimo id inserito in quella tabella, come faccio?
grazie
SELECT MAX(id) FROM TABELLAOriginariamente inviato da nicaragua90
Ho gia letto sul forum ma non sono riuscito a realizzare nulla,
io ho una tabella news mi serve poter stampare anche solo il valore dell'ulimo id inserito in quella tabella, come faccio?
grazie
Il silenzio è spesso la cosa migliore. Pensa ... è gratis.
hm...ma nn andrebbe bene anke Limit 0,1 ??
:master:
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
scusate sono proprio scarso in php ma non so proprio come stamparlo
potreste gentilmente scrivermi la query ed il modo per stamparlo
Codice PHP:
$query = "SELECT MAX(id) FROM tabella"; $result = mysql_query($query, $db);
$row = mysql_fetch_array($result);
//per stamparlo//
echo "$row[id]";
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
<?
$query = "SELECT * FROM news ORDER BY id DESC LIMIT 0,1";
$result = mysql_query($query, $nome_db);
mysql_fetch_array($result);
?>
oppure
<?
$query = "SELECT MAX(id) FROM news";
$result = mysql_query($query, $nome_db);
mysql_fetch_array($result);
?>
?? e poi per stamparla
te l'ho scritto...
cmq usa il metodo che ti ha detto piero!!
del mio nn sono sicuro!!
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made
PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in E:......
ottengo questo
c'è un errore nella query...
controlla di aver scritto i nomi dei campi giusti!
http://codecanyon.net/category/all?ref=Manuelandro
And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
memories to be made