Witam, mam problem dubluje mi wynik zapytania z pętli w dziwny sposób proszę o pomoc ! Tutaj jest link ( efekt )
http://e-desing.xaa.pl/index.php?step=shopfragment php
<?php
include_once('cfg.php');
$result1 = mysql_query("SELECT id, image_small, image_big, info, coder, graphic, kesh FROM products ORDER BY id DESC") or
die("Niepoprawne zapytanie MySQL"); {
$tablica[] = $shop;
}
$smarty->assign('result1',$tablica);
?>
oraz tpl
<!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>
<title>Sklep</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="templates/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table>
{foreach from
=$result1 key=myId item
=shop
} <tr> <td>
<img src="templates/images/uploads/{$shop.image_small}">
</td> <td>
<table>
<tr><td>Cena:</td><td>{$shop.kesh},00 zł</td></tr>
<tr><td>Koder:</td><td>{$shop.coder}</td></tr>
<tr><td>Grafik:</td><td>{$shop.graphic}</td></tr>
<tr><td>Opis:</td><td>{$shop.info}</td></tr>
</table>
</td>
</tr>
{/foreach}
</table>
Dodam że na tej samej zasadzie działają u mnie newsy i nie ma takiego problemu (IMG:
style_emoticons/default/sad.gif)