mystery, please help

admin

Administrator
Staff member
So I recently modified two columns in a table from VARCHAR columns to FLOAT columns. I can select everything fine from a mysql prompt, but including those two columns. But one (just one mind you), of the columns now doesn't show up on a php page that calls it. It worked fine before, and I haven't changed a thing. Here's the code. Any help would be appreciated. (Both columns were modified the exact same way). thanks in adv.


//access DB here btw- that SQL statement below (select * from BBALL) works fine when I paste into a command line, so I don't think there's anything wrong with the data, as might have been the problem going from a VARCHAR column to a FLOAT column///

$sql = "select * from BBALL";

$connection = mysql_connect("localhost","login","pass")
or die ("Couldn't connect to server.");

$db = mysql_select_db("my_database", $connection)
or die("Couldn't select database.");

$sql_result = mysql_query($sql,$connection)
or die("Couldn't Select.");


///try to display data here. I get blank <td> cells///


while ($row = mysql_fetch_array($sql_result)) {

$fantPerGame = $row["fantPerGame"];
$totFant = $row["totFant"];

///output html, the $totFant cell ends up blank//

echo "

<td>$totFant</td>
<td>$fantPerGame</td></tr>
";
 
Top