$sql = "select * from friend_vote order by total_value DESC limit 1"; $winner = executeQuery($sql);
result = Resource id #12
what am i doing wrong
As stated in the [man]mysql_query/man page, that command returns a MySQL query result resource ID. In order to extract the query result rows and fields, you need to use functions such as [man]mysql_fetch_assoc/man or [man]mysql_result/man.
jasondavis wrote:$sql = "select * from friend_vote order by total_value DESC limit 1"; $winner = executeQuery($sql); result = Resource id #12 what am i doing wrong
You can try this
$sql = "select * from friend_vote order by total_value DESC limit 1"; $result = mysql_query($sql); $winner = mysql_fetch_array($result); (SAMPLE OUTPUT) echo "$winner['db_table_column'];