MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Laplink Gold 2008 - $15 Off with Coupon Code CJM9NE
  #1  
Old November 13th, 2002, 05:57 AM
vlad_k vlad_k is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Croatia
Posts: 13 vlad_k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question MySQL - selecting particular row

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.

Reply With Quote
  #2  
Old November 13th, 2002, 03:00 PM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
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!

Reply With Quote
  #3  
Old November 14th, 2002, 01:27 AM
vlad_k vlad_k is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Croatia
Posts: 13 vlad_k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Too much data?

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!

Reply With Quote
  #4  
Old November 14th, 2002, 01:40 AM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MySQL - selecting particular row


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway