你是只取这一个值还是要取数组。只取一个的话。
$sql
=
"select
field1
from
pre_common_member_profile
where
uid='$username'";
$query
=
mysql_query($sql);
$bianliang
=
mysql_result($query,0);
echo
$bianliang;
取数组的话。
$sql
=
"select
field1
from
pre_common_member_profile
where
uid='$username'";
$query
=
mysql_query($sql);
while($row
=
mysql_fetch_array($query))
{
echo
$row["field1
"];
}
完毕。这些操作sql的基础知识,去看看php100的视频教程吧。给分。
$sql
=
"select
field1
from
pre_common_member_profile
where
uid='$username'";
$result
=
mysql_query($sql);
while($row
=
mysql_fetch_array($result)){
$number
=
$row[0];
//按照索引来获取值;然后进行变量的赋值;
}