php uestion plis help my?

MailL

New member
i have written a code that displays produkts from database.And i want that my first two products would be on first line >the third and fourth on other line ,...for example -like in this website. http://snsc.lt/
heres my code:
$res3=mysql_query("SELECT id,title,sm_img FROM Duomenys WHERE dataid='1' ORDER BY data DESC,id DESC LIMIT 2",$link);
$myrow3 = mysql_fetch_array($res3);

do{


printf ("


<td width='100' height='100' valign='top'><img src='%s'></td>
<td><p><a href='view_pamokos_post.php?id=%s'>%s</a></p>
</td>

",$myrow3["sm_img"],$myrow3["id"],$myrow3["title"]);
}
while($row=mysql_fetch_array($res3));
 
Back
Top