table retrieval - specific rows

wxdqz

New Member
Hi,

Thanks in advance for any help provided.

I tried searching for an answer, and i couldn't find it. Its probably a really simple answer, but just bear with me.

Here is what im trying to do.

I have a table with 7 fields and currently 5 rows of data. I need to get all the information from that table. Simple:

"SELECT * From table_name"

I can also print out all that data, all i have to do is put an echo in the while loop, like so:

while($row = mysql_fetch_array($result)) {
$field1 = $row["field1"];
$field2 = $row["field2"];
$field3 = $row["field3"];
$field4 = $row["field4"];
$field5 = $row["field5"];
$field6 = $row["field6"];
$field7 = $row["field7"];
echo "$field1 <br>";
echo "$field2 <br>";
echo "$field3 <br>";
echo "$field4 <br>";
echo "$field5 <br>";
echo "$field6 <br>";
echo "$field7 <br><br><br>";
}

This is gonna be used for a news page. Now the problem is this, i need to put the data from each row in a seperate table for each. For example lets say "table entry1" is the text in each cell of the first row, "table entry2" is the text in each cell of the second row, ect.

1)
Field 1: table entry1
field 2: table entry1
field 3: table entry1
field 4: table entry1
field 5: table entry1
field 6: table entry1
field 7: table entry1
2)
Field 1: table entry2
field 2: table entry2
field 3: table entry2
field 4: table entry2
field 5: table entry2
field 6: table entry2
field 7: table entry2

I know how to do that..but how do i single out a particular row? for example the second news article? for arguments sake lets say i want to have a "more" hyperlink for each article that will take the user to a new page and present ONLY that article.

I hope this not confusing anyone. But please help, i need to have it done urgently.

Thanks in advance,
Mike
 
Back
Top