Reply
restart fetching array
Old 08-12-2009, 03:04 AM restart fetching array
Experienced Talker

Posts: 44
Trades: 0
now i'm using the function mysql_fetch_array to start fetching all that i need is to fetch the array again in the same page.. and i dont want to repeat the function mysql_fetch_array ..
i mean that it exists a fuction to repeat the fecthing from the begining again..but i dont know it..
can anyone help me??
john_zakaria is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 08-12-2009, 04:06 AM Re: restart fetching array
tripy's Avatar
Do not try this at home!

Posts: 3,176
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
No, if you want to recreate the array, you need to call back mysql_fetch_array().
There is no "rewind" on it.
But I don't see why you don't want to call it again.
The query have already be executed by the server, and you don't re-execute it by calling fetch_array again.
You just read the result of the query a 2nd time.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-12-2009, 09:39 PM Re: restart fetching array
NullPointer's Avatar
Will Code for Food

Latest Blog Post:
Easy PHP Search with Opera
Posts: 1,068
Name: Matt
Location: Irvine, CA
Trades: 0
Like tripy said, you'll have to recall the function. You may have to reset the internal pointer in the result as well:

PHP Code:
mysql_data_seek($result0); 
This way when you recall the function it will begin fetching from the beginning of the result.
__________________
Tinsology | How to Post Code | EverythingDev
NullPointer is offline
Reply With Quote
View Public Profile
 
Old 08-15-2009, 03:55 PM Re: restart fetching array
Super Talker

Posts: 101
Trades: 0
I think you need to use mysql_data_seek and mysql_fetch_assoc functions trickly to acheive your goal.
__________________
AccuWebHosting.Com - Windows Hosting Expert
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups | Uptime Guarantee | Affiliates - $50 Per Sale
| Website Hosting
twhdir is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to restart fetching array
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11820 seconds with 13 queries