473,287 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

do a "while mysql_fetch_array loop" n+1 times

hi, i'd need to run a while ($row = mysql_fetch_array($result)) loop
thru the whole table and then one more time.
this last time the $row variable shouldn't get any values. i just need
everything in the loop be done one more time.

Thank u very much for your help

deggler
Feb 13 '08 #1
2 2967
On Feb 13, 12:10 pm, degg...@gmail.com wrote:
hi, i'd need to run a while ($row = mysql_fetch_array($result)) loop
thru the whole table and then one more time.
this last time the $row variable shouldn't get any values. i just need
everything in the loop be done one more time.

Thank u very much for your help

deggler
Can you do the "one more time" at the beginning instead of at the end?

$row = null;

do {
//do something useful
} while($row = mysql_fetch_array($result));
Feb 13 '08 #2
On 13 Feb, 17:10, degg...@gmail.com wrote:
hi, i'd need to run a while ($row = mysql_fetch_array($result)) loop
thru the whole table and then one more time.
this last time the $row variable shouldn't get any values. i just need
everything in the loop be done one more time.

Thank u very much for your help

deggler
Why can't you refactor your code so it doesn't need the extra
iteration?

C.
Feb 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sybren Stuvel | last post by:
Hi there, Is it possible to use an assignment in a while-loop? I'd like to do something like "loop while there is still something to be read, and if there is, put it in this variable". I've been...
2
by: mahurshi | last post by:
I am trying to read a file full of numbers followed by spaces (and then do some cool stuff with it) My input file looks like this 1 0 1 0 1 0 1 1 1 0 0 1 1 0
32
by: Toby Newman | last post by:
At the page: http://www.strath.ac.uk/IT/Docs/Ccourse/subsection3_8_3.html#SECTION0008300000000000000 or http://tinyurl.com/4ptzs the author warns: "The for loop is frequently used, usually...
6
by: John Pass | last post by:
What is the difference between a While and Do While/Loop repetition structure. If they is no difference (as it seems) why do both exist?
34
by: Frederick Gotham | last post by:
Is the domestic usage of the C "for" loop inefficient when it comes to simple incrementation? Here's a very simple program that prints out the bit-numbers in a byte. #include <stdio.h> #include...
13
by: Sunbags | last post by:
Hello, I'm a 2nd year Computer Engineering student and I have a problem with my VB6 code. I've just started learning VB6 for a project in which we have to create a form which displays the...
2
by: recordlovelife | last post by:
So I am trying to display a title, date, and content of a wordpress blog. Word press provides nice drop in functions to get the job done with simple names like "the_title", and the "the_content" But...
15
by: Steve | last post by:
I am having problems getting values out of an array. The array is set as a global array and values are pushed into it as they are read from a JSON file using a "for loop". When the "for loop" is...
1
by: robotlizz | last post by:
Hello - I am a brand new at Java and I am having a hard time with a program I have to turn in tomorrow. I can not get the 'Q' option to work and the loop goes on forever. I've tried to go over the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.