HI the below code is working well with one exception if there is no results (which will happen a few times) then of course nothing is shown id like to put "sorry no results found here" of nothing is pulled from the database
[CODE=php]$caslimitset = $_GET['caslimitset'];
if ($caslimitset == "")
{
$caslimitset=4;
}
else
{
$caslimitset = $_GET['caslimitset'];
}
$whatid = $_GET['id'];
$result7 = mysql_query(" SELECT *
FROM `table`
WHERE `size` = $sizeid
ORDER BY `cases`.`id` DESC
LIMIT $caslimitset ");
while($r7 = mysql_fetch_arr ay($result7))
{
$id=$r7["id"];
$ptno=$r7["ptno"];
$heightmm=$r7["heightmm"];
$widthmm=$r7["widthmm"];
$depthmm=$r7["depthmm"];
$size=$r7["size"];
$manafacturer=$ r7["manafactur er"];
echo"
<li><span class='family-productname'><s trong>$title </strong></span><br />
<img src='Images/products/cases/$ptno.jpg' width='100' height='80' /><br />
<span class='family-productname'>
$ptno</span></li>";
}[/CODE]
i have tried this
[CODE=php]$caslimitset = $_GET['caslimitset'];
if ($caslimitset == "")
{
$caslimitset=4;
}
else
{
$caslimitset = $_GET['caslimitset'];
}
$whatid = $_GET['id'];
$result7 = mysql_query(" SELECT *
FROM `table`
WHERE `size` = $sizeid
ORDER BY `cases`.`id` DESC
LIMIT $caslimitset ");
if ($result7 == "")
{
echo" sorry no results here";
}
else
{
while($r7 = mysql_fetch_arr ay($result7))
{
$id=$r7["id"];
$ptno=$r7["ptno"];
$heightmm=$r7["heightmm"];
$widthmm=$r7["widthmm"];
$depthmm=$r7["depthmm"];
$size=$r7["size"];
$manafacturer=$ r7["manafactur er"];
echo"
<li><span class='family-productname'><s trong>$title </strong></span><br />
<img src='Images/products/cases/$ptno.jpg' width='100' height='80' /><br />
<span class='family-productname'>
$ptno</span></li>";
}
}[/CODE]
but this dosent work and still shows nothing.
can anyone help with this ( without having to so a 2nd query like a row count)
Thanks
Deccypher
[CODE=php]$caslimitset = $_GET['caslimitset'];
if ($caslimitset == "")
{
$caslimitset=4;
}
else
{
$caslimitset = $_GET['caslimitset'];
}
$whatid = $_GET['id'];
$result7 = mysql_query(" SELECT *
FROM `table`
WHERE `size` = $sizeid
ORDER BY `cases`.`id` DESC
LIMIT $caslimitset ");
while($r7 = mysql_fetch_arr ay($result7))
{
$id=$r7["id"];
$ptno=$r7["ptno"];
$heightmm=$r7["heightmm"];
$widthmm=$r7["widthmm"];
$depthmm=$r7["depthmm"];
$size=$r7["size"];
$manafacturer=$ r7["manafactur er"];
echo"
<li><span class='family-productname'><s trong>$title </strong></span><br />
<img src='Images/products/cases/$ptno.jpg' width='100' height='80' /><br />
<span class='family-productname'>
$ptno</span></li>";
}[/CODE]
i have tried this
[CODE=php]$caslimitset = $_GET['caslimitset'];
if ($caslimitset == "")
{
$caslimitset=4;
}
else
{
$caslimitset = $_GET['caslimitset'];
}
$whatid = $_GET['id'];
$result7 = mysql_query(" SELECT *
FROM `table`
WHERE `size` = $sizeid
ORDER BY `cases`.`id` DESC
LIMIT $caslimitset ");
if ($result7 == "")
{
echo" sorry no results here";
}
else
{
while($r7 = mysql_fetch_arr ay($result7))
{
$id=$r7["id"];
$ptno=$r7["ptno"];
$heightmm=$r7["heightmm"];
$widthmm=$r7["widthmm"];
$depthmm=$r7["depthmm"];
$size=$r7["size"];
$manafacturer=$ r7["manafactur er"];
echo"
<li><span class='family-productname'><s trong>$title </strong></span><br />
<img src='Images/products/cases/$ptno.jpg' width='100' height='80' /><br />
<span class='family-productname'>
$ptno</span></li>";
}
}[/CODE]
but this dosent work and still shows nothing.
can anyone help with this ( without having to so a 2nd query like a row count)
Thanks
Deccypher
Comment