Visa ett inlägg
Oläst 2005-09-05, 14:09 #6
Charlie Charlie är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Jul 2004
Inlägg: 701
Charlie Charlie är inte uppkopplad
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 :-)
Charlie är inte uppkopplad   Svara med citatSvara med citat