E
egobuilders
Guest
I have successfully connected to the database and confirmed it, however, this returns a zero, even though myfield contains a 7... I have tried with and without apostrophes, etc... I also added AS myfield after MAX(myfield), but it still returns 0. Sometimes it even returns a 5, which has absolutely no relation to anything... there are not 5 instances of anything!
$result = mysql_query("SELECT MAX(myfield) FROM stats"); // does not work
$result = mysql_query("SELECT MAX('myfield') FROM 'stats'"); // does not work
$result = mysql_query("SELECT MAX(myfield) AS myfield FROM stats"); // does not work
No combination of these works. Help!!!
The data type is int(50) ...50 should be plenty
$result = mysql_query("SELECT MAX(myfield) FROM stats"); // does not work
$result = mysql_query("SELECT MAX('myfield') FROM 'stats'"); // does not work
$result = mysql_query("SELECT MAX(myfield) AS myfield FROM stats"); // does not work
No combination of these works. Help!!!
The data type is int(50) ...50 should be plenty
