06-06-2009, 11:54 AM
|
#37 (permalink)
|
|
The Visitor
Join Date: Jun 2009
Posts: 2
Thanks: 0
|
Hi is anyone helpe me wait this sql table
CREATE TABLE video (
id tinyint(4) NOT NULL auto_increment,
singer_name text NOT NULL,
category text NOT NULL,
song_name text NOT NULL,
video_url text NOT NULL,
img_url text NOT NULL,
dis text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
the result code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"> </td>
<td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="395" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11%"><?php
include ("config.php");
mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$result = mysql_query("SELECT * FROM video order by id desc LIMIT 3");
while($r=mysql_fetch_array($result))
{
$singer_name=$r["singer_name"];
$song_name=$r["song_name"];
$dis=$r["dis"];
$id=$r["id"];
$img_url=$r["img"];
?></td>
<td width="89%"> </td>
</tr>
<tr>
<td height="96" align="center" valign="top"><? echo "<img border='0' src="; if ($img_url=="") { echo 'images/nopic.gif'; } else { echo "$img"; } echo" width='80' height='70'>"; ?></td>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="26" valign="middle"><?=$Singer_name?></td>
</tr>
<tr>
<td height="21"><?=$song_name_name?></td>
</tr>
<tr>
<td height="21"><?=$dis?></td>
</tr>
<tr>
<td height="21"><a href="viewvideo.php?id=<?=$id?>">Click Here To Watch
<?=$video?>
Video </a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14" align="left" valign="top"> </td>
<td> </td>
</tr>
</table>
<? } ?>
<?php mysql_close(); ?></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>
but it show only limit
how does it work wait pagination 10 row per page ?
Last edited by lema : 06-06-2009 at 06:10 PM.
|
|
|
|