|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello!
I cannot find any SQL reference that explains how to select a particular ROW from a table. I need to select a row by its order value, not a column value. Could anyone help? Thanks. |
|
#2
|
|||
|
|||
|
I think...
I just fool around and copy code, but I think you need to decide how you are going to choose the row...is it a link a user chooses? How is it choosen? That matters for how you will call it from the database. I can give you more spacifics when you decide how you will initiate the query....
Example: I have a link page that calls spacific rows from the database according to the link, in this case it's newsletters. They choose the link, they get a new page with the newsletter. The newsletter was generated from a form another person created. So all the user gets is the link page ( full of links from the database ( as many as there are completed newsletters ) and the (rows) newsletters they choose to view. The code for the link page is: $result = mysql_query("SELECT * FROM newsletteremily",$db); if ($myrow = mysql_fetch_array($result)) { do { echo "<p align=center>\n"; printf ("<a href= msemilynewsletter1.php?id=%s%s>%s</a><br>\n",$php_self,$myrow["id"],$myrow["date"]); } while ($myrow = mysql_fetch_array($result)); } else { echo "Sorry, no records were found."; } Hope this helps...
__________________
bow wow! |
|
#3
|
|||
|
|||
|
Hello...
What I actually need is to select the particular RECORD. Thus if I have 10 records in a table, I wish to select, for example, record no. 3, regardless of the values in columns. I might do it with SELECT *, and fetch record by record in void until I hit the wanted record. But what worries me is the lenght of data transmitted from the MySQL server to the PHP script. For example if I have 2000 records, and wish to access record no. 1356, the previous solution would be too expensive. Furthermore I have BLOBs in the records... So is there anything like SELECT * FROM table WHERE table.row=1356; ? Thanks in advance! |
|
#4
|
|||
|
|||
|
What I gave was..
What I gave was not the solution you were looking for. what I gave would give all records in database with a link to display the record on a new page, however you would want it displayed ( another page in itself).
to show what you are asking... yes I've seen the code, just don't have any code on me now, wrong computer. Hang in there, help is on the way. I'm stuck on another computer for a few days and am lost without my other computer, can just surf web. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > MySQL - selecting particular row |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|