|
Posted by shotokan99 on 05/22/07 02:32
as of now im using this approach to take data:
=====================================
require('conn.php');
$q='select * from '.$dbf_vid.' order by xrank';
$res=mysql_query($q) or die('error: cannot perform query on new');
$num=mysql_numrows($res);
$i=0;
while($i<$num){
$id=mysql_result($res,$i,'xid');
$rank=mysql_result($res,$i,'xrank');
$title=mysql_result($res,$i,'xtitle');
$artist=mysql_result($res,$i,'xartist');
$taglink=mysql_result($res,$i,'xtaglink');
$img=mysql_result($res,$i,'ximg');
$ref=mysql_result($res,$i,'xref');
$swf=mysql_result($res,$i,'xswf');
if($i%2==0){
$color='#BCBCDE';
$i++;
}else{
$color='#FFFFFF';
$i++;
}
echo'<tr>';
echo' <td bgcolor="'.$color.'" width="33"><font face="Verdana"
size="1">'.$id.'</font></td>';
echo' <td bgcolor="'.$color.'" width="28"><font face="Verdana"
size="1">'.$rank.'</font></td>';
echo' <td bgcolor="'.$color.'" width="183"><font face="Verdana"
size="1">'.$title.'</font></td>';
echo' <td bgcolor="'.$color.'" width="213"><font face="Verdana"
size="1">'.$artist.'</font></td>';
echo' <td bgcolor="'.$color.'" width="110"><font face="Verdana"
size="1">'.$ref.'</font></td>';
echo' <td bgcolor="'.$color.'" width="54"><font face="Verdana"
size="1">
<a href="mtvdel.php?id='.$id.'&dbf=mtv_topvid_ph">delete</
a></font></td>';
echo' <td bgcolor="'.$color.'" width="53"><font face="Verdana"
size="1"><a href="mtvedit.php?
id='.$id.'
&rank='.$rank.'
&title='.$title.'
&by='.$artist.'
&taglink='.$taglink.'
&ref='.$ref.'
&img='.$img.'
&swf='.$swf.'
">edit</a></font></td>';
echo' </tr>';
}//end while
==================================
this works fine with me, but is there much better approach compared to
what im doing?
tnx
Navigation:
[Reply to this message]
|