Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-15-2012, 11:37 PM   PM User | #1
comport9
New Coder

 
Join Date: Oct 2012
Posts: 25
Thanks: 2
Thanked 0 Times in 0 Posts
comport9 is an unknown quantity at this point
Working with "resources" - search/extract

While working on sorting through my database I've discovered something called "resources". My resource in this case is all the rows & columns of my particular table.

Now, I know I can use mysql_fetch_array() in a while statement to loop through it, but is there a faster way of simply reaching in in pulling out the data I want rather than looping through it?

For instance, if I know the 'id' of the row I want, and the name of the column I want, can I grab the data associated with them directly?

Also, if anyone has a good place that gives more info on resources it would be appreciated. Thansk!

Edit: did some more research, doesn't seem like there's a way to do it. So I guess my next question would be, is it faster to loop over the existing resource or do another, targeted, query? If it depends on how many rows (how much data) what would the breaking point be?

Last edited by comport9; 11-15-2012 at 11:57 PM..
comport9 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:27 PM.


Advertisement
Log in to turn off these ads.