Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How would PHP read this script?
Old 05-29-2011, 11:01 AM How would PHP read this script?
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
So, I have a small script that does a lot of actions very fast. However, I am wondering about a small piece of it, and whether it will work or not. Example:

PHP Code:
while ($blah=mysql_fetch_array($blahs)) {
     
//Do something to all $blahs
}
header("Location: index.php?success"); 
Basically the script does a large amount of queries to the database inside that while, which each need to be done separately. However, my question is: will the redirect fire before the script is done processing the while? Obviously I don't want the script to be cut off

Thanks!

-PG
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-29-2011, 11:07 AM Re: How would PHP read this script?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Nope it will process the header instruction on exiting the loop.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-29-2011, 11:13 AM Re: How would PHP read this script?
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
Alright, thanks chris! Always to the rescue :P
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to How would PHP read this script?
 

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.12754 seconds with 12 queries