Jump to content

[SOLVED] Identifing rows!


budimir

Recommended Posts

Hey guys,

 

How can I idnetify which row is which. I'm using this code:

 

$upit = "SELECT * FROM opisi JOIN slike ON opisi.opis_id = slike.id ORDER BY datum DESC LIMIT 4";
$rezultat = mysql_query($upit,$veza) or die (mysql_error());
while($values = mysql_fetch_array($rezultat)){

 

How can I say..

 

Echo row1

Echo row2

...

Echo row4

Link to comment
https://forums.phpfreaks.com/topic/121024-solved-identifing-rows/
Share on other sites

OK, to clarify a little bit more.

 

I have 4 divs, and each one I want to put data I'm getting in this loop.

 

while($row = mysql_fetch_array($rezultat)){
$opis_id = $row["opis_id"];
$opis = $row["opis"];
$datum = $row["datum"];
$unio = $row["unio"];
$lokacija = $row["lokacija"];
$zupanija = $row["zupanija"];
$drzava = $row["drzava"];
$kategorija = $row["kategorija"];
$link = $row["link"];
$naziv = $row["naziv"];

 

My problem is I wan't to put first row of DB to DIV1, second row of DB to DIV2, third row of DB to DIV3, fourth row of DB to DIV4.

How can I tell the program which row need's to go where???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.