Need some general opinion as to what is wrong with this piece of code. Any suggestion appreciated in advance.
<?php
$connection = mysql_connect("localhost","server" ,"password") or die ("Cannot make that connection");
$db = mysql_select_db("database");
$result = mysql_query("SELECT * FROM atable");
$fields = mysql_fetch_row($result);
mysql_query("UPDATE atable SET field=field+1");
$thecount0 = $result->record["one"];
$thecount1 = $fields[];
print ($thecount0);
print ($thecount1);
?>
Neither of these approaches works. it returns a null and does not update the db at all and so forth.
Any clues??