猿问

产生的结果集中size怎样访问

$sql="select user_name,REPLACE(SUBSTRING(SUBSTRING_INDEX(mobile,',',a.id),CHAR_LENGTH(SUBSTRING_INDEX(mobile,',',a.id-1)) + 1),',','') as mobile from table4 a cross join (select user_name,CONCAT(mobile,',') as mobile,length(mobile) - length(REPLACE(mobile,',','')) + 1 size from table1 b) b on a.id<=b.size";

while ($row=mysql_fetch_array($rs)){
   echo $row['user_name']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$row['mobile']."&nbsp;&nbsp;&nbsp;&nbsp;".$row['size']."<br/>";
}

这样写size无法读出,错误信息是Undefined index:,求大神解答

九零后啊雷
浏览 1083回答 1
1回答

晚安sp

打印下结果集看看结构就知道了
随时随地看视频慕课网APP
我要回答