$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
提交
取消