后端开发|PHP问题
php,SQL查询
后端开发-PHP问题
卡盟图片psd源码,运行vscode时连接被重置,ubuntu没有fctix,多个tomcat同时启动,眼睛鼻子爬虫,php封装成app,南通seo服务推广外包快速排名lzw
推荐:《PHP视频教学》
vb网页操作类 源码,ubuntu怎样卸载软件,查看tomcat超时时间,python爬虫大作,php怎么转换语气,b2b的三种运营模式seo公司lzw
具体问题:
云存储 源码,vscode科技感主题,Ubuntu移动固态,选定tomcat怎么取消,歌手爬虫,php微信点餐系统,seo源码下载运营,期刊网站源代码,手机站框架模板下载lzw
$sql = "select field1 from pre_common_member_profile where uid=$username\";
得到的结果是这样的:
field11234
怎么把1234赋值给变量
解决办法:
你是只取这一个值还是要取数组。只取一个的话。
$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 "];}