Cool.
Now we need to select everything in the column "point" in your database table and store the result of this query in a variable.
We do this, like this:
PHP Code:
$result = mysql_query("SELECT point FROM yourTable");
This returns a results set which we can loop over using while and mysql_fetch_array
PHP Code:
<?php
$con = mysql_connect("localhost","yourName","yourPassword");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("yourDatabase", $con);
$result = mysql_query("SELECT point FROM yourTable");
while($row = mysql_fetch_array($result)) {
echo "$row['point']<br />";
}
mysql_close($con);
?>
I've got to duck out now for a bit, but this should give you something to experiment with.
Let me know how you get on.
Bookmarks