Mycket flitig postare
|
|
Reg.datum: Jul 2004
Inlägg: 701
|
|
Mycket flitig postare
Reg.datum: Jul 2004
Inlägg: 701
|
<?php
$mysql_connect("host","anv","pass);
$sql = "SELECT SUM(kollumn) FROM tabell";
$result = mysql_query($sql) or die(mysql_error());
print $result;
?>
Som grazzy skrev
<?php
$mysql_connect("host","anv","pass);
$sql = "SELECT SUM(kollumn) FROM tabell";
$result = mysql_query($sql) or die(mysql_error());
$result_fetched = mysql_fetch_row ( $result );
print $result_fetched[0];
?>
Edit: Meh, kanske borde ta och uppdatera innan jag postar så att jag kan se om någon annan har skrivit ett inlägg, under halvtimmen som sidan har varit öppen :-)
|