$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']." ".$row['mobile']." ".$row['size']."<br/>";}这样写size无法读出,错误信息是Undefined index:,求大神解答
添加回答
举报
0/150
提交
取消