主頁 > 知識(shí)庫 > 從數(shù)據(jù)庫中讀取記錄橫向排列

從數(shù)據(jù)庫中讀取記錄橫向排列

熱門標(biāo)簽:銀行業(yè)務(wù) 電子圍欄 科大訊飛語音識(shí)別系統(tǒng) 阿里云 服務(wù)器配置 Mysql連接數(shù)設(shè)置 Linux服務(wù)器 團(tuán)購網(wǎng)站
 table width="100%" border="0" cellpadding="0" cellspacing="0">    
% do while not rs.eof %>
    tr>
       td height="80">img src="%= rs("圖片")%>" width="160" height="80">/td>      
    /tr>
% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
/table>
記錄排列如下:
1
2
3
4
5
如果我想把記錄排列改成
1  2  3
4  5
那么以上代碼該怎么改,請(qǐng)高手幫忙一下
復(fù)制代碼 代碼如下:

table width="100%" border="0" cellpadding="0" cellspacing="0">    
%   i=0   
  do while not rs.eof 
  if i mod 3 =0 then %>
  tr>   
  % end if %>
     td height="80">img src="%= rs("圖片")%>" width="160" height="80">/td>      
  % 
  if (i+1) mod 3=0 then
  %>
  /tr>
  %end if%>   
  %   
  i=i+1
  if i>=MaxPerPage then exit do 
  rs.movenext   
  loop  
  %>  
/table>
您可能感興趣的文章:
  • php 遍歷數(shù)據(jù)表數(shù)據(jù)并列表橫向排列的代碼

標(biāo)簽:蚌埠 江蘇 廣元 衢州 萍鄉(xiāng) 大理 棗莊 衡水

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《從數(shù)據(jù)庫中讀取記錄橫向排列》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266