821217
(821217)
注册会员

一般会员
UID 30609
精华
0
积分 81
帖子 81
金钱 81 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2004-8-19
状态 离线
|
在java语言我怎么读出mysql数据库的数据。请高手帮忙。
<? $sql="select * from table";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
while($row=mysql_fetch_array($result)){[B][U]//这里是个循环[/U][/B]
?>
<TABLE height=23 cellSpacing=0 cellPadding=0 width="99%" border=0>
<TBODY>
<TR bgColor=#0396f8>
<TD height=20 align=left vAlign=bottom bgcolor="#FFFFFF">
<script language="javascript">
var strArray=new Array();
strArray[0]=' · <a href=gq/g4_info.php?ID=8 target="_blank"><font color=#666666>[B][U]我要在这读出数据(这是怎么写?<? echo $row;?> )[/U][/B]<font></a>';
document.write('<table width=100% border=0 cellspacing=0 cellpadding=0>'
+'<tr><td>'
+'<div id="icefable1" style="width:320;">'
+'<table width=320 border=0 cellspacing=0 cellpadding=0 align=center>'
+'<tr><td width=320 height=21 align=left>'+strArray[0]+'</td></tr>'
+'<tr><td width=320 height=21 align=left>'+strArray[1]+'</td></tr>'
+'<tr><td width=320 height=21 align=left>'+strArray[2]+'</td></tr>'
+'<tr><td width=320 height=21 align=left>'+strArray[3]+'</td></tr>'
+'<tr><td width=320 height=21 align=left>'+strArray[4]+'</td></tr>'
+'<tr><td width=320 height=21 align=left>'+strArray[5]+'</td></tr>'
+'</table>'
+'</div>'
+'<div id="icefable2" style="position:absolute;z-index:1;visibility:hidden"></div>'
+'</td></tr>'
+'</table>');
marqueesHeight=20;
stopscroll=false;
icefable1.scrollTop=0;
with(icefable1){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preTop=0; currentTop=0; stoptime=0;
function init_srolltext(){
icefable2.innerHTML="";
icefable2.innerHTML+=icefable1.innerHTML;
icefable1.innerHTML=icefable2.innerHTML+icefable2.innerHTML;
setInterval("scrollUp()",50);
}
function scrollUp(){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==22)
{
stoptime+=1;
currentTop-=1;
if(stoptime==50)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=icefable1.scrollTop;
icefable1.scrollTop+=1;
if(preTop==icefable1.scrollTop){
icefable1.scrollTop=icefable2.offsetHeight-marqueesHeight;
icefable1.scrollTop+=1;
}
}
}
init_srolltext();
</script> </TD>
</TR></TBODY></TABLE>
<? }?>[B][U]//循环到这结束[/U][/B]
|
|