php - how to only show some of the fields in an INNER JOIN -
i have following results.. problem want 1 field balances table , 2 fields userinfo table... if replace * user,avatar error...
$result = mysql_query("select * userinfo inner join balances on userinfo.user = balances.user order balance desc,avatar"); if (!$result) { die("query show fields table failed");
i not know proper form , cant find anywhere
tia john
as user
column exists in both joined tables userinfo
, balances
need prefix table name while accessing column
try
select userinfo.user, userinfo.avatar, balances.balance userinfo inner join balances on userinfo.user = balances.user order balance desc,avatar
Comments
Post a Comment