Jump to content

getting a mysql value into a variable


joebudden

Recommended Posts

are there any special operations you want to do to the integer, or do you just want to pull an integer out of your database?

[code]
$sql = "SELECT * FROM `tablename`";

$result = mysql_query($sql) or die(mysql_error());

while($row = mysql_fetch_array($result))
{
$integer = $row['fieldcontainingintegers'];

                echo $integer;
        }
[/code]

will get an integer out, but this is my super-long-roundabout way to do it...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.