[PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
Does any one knows why while loop below ends after few loops when it meant to keep in loop? File name: while_loop_script.php define('run', 0); define('START', 10); while(START run){ $ch = curl_init(mydomain/update_script.php?action=run); curl_exec($ch); curl_close($ch); } using php.exe to

Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
...@gmail.com] Sent: Monday, April 06, 2009 3:51 PM To: php-general@lists.php.net Subject: [PHP] [php] while loop failure Does any one knows why while loop below ends after few loops when it meant to keep in loop? File name: while_loop_script.php define('run', 0); define('START', 10

Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
] while loop failure Does any one knows why while loop below ends after few loops when it meant to keep in loop? File name: while_loop_script.php define('run', 0); define('START', 10); while(START run){ $ch = curl_init(mydomain/update_script.php?action=run); curl_exec($ch); curl_close

RE: [PHP] [php] while loop failure

2009-04-06 Thread Chetan Rane
Innovation in software product design, development and delivery- www.persistentsys.com -Original Message- From: Andrew Williams [mailto:andrew4willi...@gmail.com] Sent: Monday, April 06, 2009 3:51 PM To: php-general@lists.php.net Subject: [PHP] [php] while loop failure Does any one knows why

Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
Does any one knows why while loop below ends after few loops when it meant to keep in loop? File name: while_loop_script.php define('run', 0); define('START', 10); while(START run){ $ch = curl_init(mydomain/update_script.php?action=run); curl_exec($ch); curl_close($ch); } using

Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
setting: max_execution_time = -1     ; Maximum execution time of each script, in seconds max_input_time = -1    ; Maximum amount of time each script may spend parsing request data ;max_input_nesting_level = 64 ; Maximum input variable nesting level memory_limit = 2036M      ; Maximum

[PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Andrew Williams
can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing } -- Best Wishes Andrew Williams

Re: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Craig Whitmore
On Fri, 2009-03-27 at 08:11 +, Andrew Williams wrote: can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing } max_execution_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Arno Kuhl
-Original Message- From: Andrew Williams [mailto:andrew4willi...@gmail.com] Sent: 27 March 2009 10:12 AM To: PHP LIST Subject: [PHP] WHILE LOOP PROBLEM can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing

[PHP] while loop

2005-02-23 Thread Reinhart Viane
Hey list I have a mysql table like this: Act_name Act_type_id Act_date Heyhey 1 22-06-05 Aloha 2 22-06-05 Tralala 2 22-06-05 Wuhu 1 22-06-05 Hehe 3 22-06-05 Olalal 3 22-06-05 Pompom 1 22-06-05 Wuhu 2 22-06-05 Now I retrieve all activities happening in the future

Re: [PHP] while loop

2005-02-23 Thread Burhan Khalid
Reinhart Viane wrote: Hey list I have a mysql table like this: [ snipped ] Now I retrieve all activities happening in the future with this query: $sqlact=select * from activities where act_date = NOW() order by act_type_id; $getact=mysql_query($sqlact) What Im trying to do now is: From

Re: [PHP] while loop

2005-02-23 Thread Richard Lynch
Reinhart Viane wrote: Hey list I have a mysql table like this: Act_name Act_type_id Act_date Heyhey 1 22-06-05 Aloha2 22-06-05 Tralala 2 22-06-05 Wuhu1

Re: [PHP] while loop

2005-02-23 Thread Justin Lilly
Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the sorting -much- easier. I'm not sure if that's an option, but if it is, I'd consider exploring it. select * from activities where act_date = NOW() act_type_id = 1 or

RE: [PHP] while loop

2005-02-23 Thread Reinhart Viane
@lists.php.net Onderwerp: Re: [PHP] while loop Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the sorting -much- easier. I'm not sure if that's an option, but if it is, I'd consider exploring it. select * from activities

Re: [PHP] while loop

2005-02-23 Thread Marek Kilimajer
: Justin Lilly [mailto:[EMAIL PROTECTED] Verzonden: woensdag 23 februari 2005 18:57 Aan: php-general@lists.php.net Onderwerp: Re: [PHP] while loop Perhaps it is just me, but wouldn't it be easier to make individual mysql queries for each different act type? That would make the sorting -much- easier. I'm

Re: [PHP] while loop

2005-02-23 Thread Jochem Maas
Reinhart Viane wrote: Well I'm able to do that, there are only 4 different types, but the 4 queries have exactly the same syntax so I think it's better to combine them. Not? what about using UNION on the four queries? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] while loop with mysql

2003-03-10 Thread Richard Kurth
Can somebody look at this and tell me way the first while loop will only loop through the database once when there is more than one record that should be processed. while($members = @mysql_fetch_object($result)) { $logged_email=$members-email; $logged_title=$members-title;

Re: [PHP] while loop with mysql

2003-03-10 Thread Tom Rogers
Hi, Monday, March 10, 2003, 7:20:37 PM, you wrote: RK Can somebody look at this and tell me way the first while loop will RK only loop through the database once when there is more than one record RK that should be processed. RK while($members = @mysql_fetch_object($result)) { RK

Re[2]: [PHP] while loop with mysql

2003-03-10 Thread Richard Kurth
Hello Tom, I have been looking at this for an hour and thought it was something like that but I could not see it. I guess it is time to go to bed. Thanks Monday, March 10, 2003, 1:47:27 AM, you wrote: TR Hi, TR Monday, March 10, 2003, 7:20:37 PM, you wrote: RK Can somebody look at this and

[PHP] while loop- will this work?

2003-01-30 Thread SpyProductions Support Team
Should this work? $f1 = rand(999,999); while($check_sid = mysql_query(SELECT * FROM that_table WHERE this = '$f1')){ $f1 = rand(999,999); } i.e. put the random number in a loop to check and make sure it is already not in use? Thanks, -Mike -- PHP

RE: [PHP] while loop- will this work?

2003-01-30 Thread Matt Schroebel
-Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 12:57 PM To: [EMAIL PROTECTED] Subject: [PHP] while loop- will this work? Should this work? $f1 = rand(999,999); while($check_sid

RE: [PHP] while loop- will this work?

2003-01-30 Thread Roedel, Mark
-Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 11:57 AM To: [EMAIL PROTECTED] Subject: [PHP] while loop- will this work? Should this work? Nope...because the value returned by mysql_query() isn't the number

[PHP] While loop not working - please help

2002-08-09 Thread Wendy Yung
Can anyone tell me why this part of my code is not functional? The code might be quite messy to look at, but I've commented wherever I can. $gp = fopen(myFile.txt,r); while(($t = fgets($gp,1024)) !feof($gp)) { if ($t[0] == '=' $t[1] == 'D') { \\Looks for =D in

Re: [PHP] while loop question - problem (new set of eyes needed)

2002-05-20 Thread Rasmus Lerdorf
You are resetting $row inside your loop. Don't do that. On Sun, 19 May 2002, Lee P Reilly wrote: Hi, I wonder if someone could have a quick look at this for me? It's a simple while loop, but it's not acting the way (I think) it should. If I break down the while loop, it reads:

[PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread Lee P Reilly
Hi, I wonder if someone could have a quick look at this for me? It's a simple while loop, but it's not acting the way (I think) it should. If I break down the while loop, it reads: // $result contains 3 rows while($row =

Re: [PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread Julie Meloni
LPR LPR while($row = mysql_fetch_array($result)) LPR { LPR $pri = $row['pri']; LPR $fg = $row['fg']; LPR $molw = $row['molw']; LPR $density = $row['density']; LPR $denstype = $row['denstype']; LPR $pctd = $row['pctd']; LPR

RE: [PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread Martin Towell
else 27 $html .= $concentration $concunit $compnamebr; 28 } -Original Message- From: Lee P Reilly [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 9:24 AM To: PHP List Subject: [PHP] while loop question - problem (new set of eyes needed) Hi, I wonder if someone could have

RE: [PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread David Freeman
while($row = mysql_fetch_array($result)) { So, your while loop is based on values of $row. $row = mysql_fetch_array($result); Now within your while loop you've altered the value of $row - poor thing is probably a tad confused. CYA, Dave -- PHP General Mailing List

Re: [PHP] while loop: detect next loop?

2002-03-28 Thread Tom Rogers
Hi add the newline and white space first like this $data_printed = ; while ($row = mysql_fetch_assoc($result)) { if($data_printed != ){ $data_printed .= \n; } $data_printed = file id=\ . $row['file_id'] . \ . $row['file_name'] . /file; } That will

Re: [PHP] while loop: detect next loop?

2002-03-27 Thread Erik Price
On Wednesday, March 27, 2002, at 04:11 PM, Matt Friedman wrote: When you have all your items in an array use implode to add a character in between every item. $str = implode($yourArray, $separator); This will add the separator to the end of each string except the last one. I like that

Re: [PHP] while loop: detect next loop?

2002-03-27 Thread Jason Wong
On Thursday 28 March 2002 05:20, Erik Price wrote: On Wednesday, March 27, 2002, at 04:11 PM, Matt Friedman wrote: When you have all your items in an array use implode to add a character in between every item. $str = implode($yourArray, $separator); This will add the separator to

[PHP] while loop with if statement

2001-08-20 Thread sgibbs
I can't figure out why the if statement isn't working. The page displays the same with or without the if statement. Any idea what I'm doing wrong? I attached the code in a word document. Thank you, Shawna -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

RE: [PHP] while loop with if statement - here's the attachment

2001-08-20 Thread sgibbs
Here's the attachment - I hate it when I do that! :) -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 8/20/01 10:25 AM Subject: [PHP] while loop with if statement I can't figure out why the if statement isn't working. The page displays the same with or without

Re: [PHP] while loop with if statement - here's the attachment

2001-08-20 Thread Steve Brett
-- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 8/20/01 10:25 AM Subject: [PHP] while loop with if statement I can't figure out why the if statement isn't working. The page displays the same with or without the if statement. Any idea what I'm doing wrong? I attached the code in a word

RE: [PHP] while loop with if statement - here's the code

2001-08-20 Thread sgibbs
Thanks Steve! :) Here's the code: ? $results = mysql_db_query($db, select * from $table where $query order by update_datetime desc limit $offset, 10); while($one = mysql_fetch_array($results)){ $id=$one[id]; $title=$one[title]; $description=$one[description];

Re: [PHP] while loop with if statement - here's the code

2001-08-20 Thread Steve Brett
try using mysql_num_rows() to get the number of rows returned by the query. you need to supply it with the identifier for the query not the sql you sent to the query. not exactly sure what you're trying to do though ... Steve [EMAIL PROTECTED] wrote in message

Re: [PHP] while loop with if statement - here's the code

2001-08-20 Thread Steve Brett
okay - read all the code now. this might be a better way: ?php $results = mysql_db_query($db, select * from $table where $query order by update_datetime desc limit $offset, 10); $one = mysql_fetch_array($results); $numrows=mysql_num_rows($one);// get the number of results if ($numrows0)

RE: [PHP] while loop with if statement - here's the code

2001-08-20 Thread Alnisa Allgood
At 11:02 AM -0400 8/20/01, [EMAIL PROTECTED] wrote: ? $results = mysql_db_query($db, select * from $table where $query order by update_datetime desc limit $offset, 10); while($one = mysql_fetch_array($results)){ $id=$one[id]; $title=$one[title];

Re: [PHP] while loop

2001-04-10 Thread Brian Clark
Hi Jacky, @ 2:11:06 PM on 4/10/2001, Jacky@lilst wrote: Not in the actual code, sorry, I did not copy the opnneing bit, but there is one in the code. So the same question, I got error said, maximum execution time exceed, am I doing something time consuming here? Unless I'm blind this

Re: [PHP] while loop

2001-04-10 Thread Zeus
That was detailed :) Thanks Jack, it fixed my misconception of the = and == operators. BUT ... mysql_fetch_array keeps track of where it is in the array. after each while loop it moves a 'step ahead' in the result the mysql_fetch_array fetches the results in an array but should it be an one

Re: [PHP] while loop

2001-04-10 Thread Jack Dempsey
Zeus wrote: That was detailed :) Thanks Jack, it fixed my misconception of the = and == operators. BUT ... mysql_fetch_array keeps track of where it is in the array. after each while loop it moves a 'step ahead' in the result the mysql_fetch_array fetches the results in an array

Re: [PHP] while loop

2001-04-10 Thread Philip Olson
Sent: Tuesday, April 10, 2001 12:58 AM Subject: Re: [PHP] while loop Isn't the '=' operator suppose to be used for assigning and not for evaluation. I thought '==' should be used in this context? Zeus - Original Message - From: David Robley [EMAIL PROTECTED] To: Zeu

Re: [PHP] while loop

2001-04-10 Thread Yasuo Ohgaki
inal Message - From: David Robley [EMAIL PROTECTED] To: Zeus [EMAIL PROTECTED]; Michael Hall [EMAIL PROTECTED]; Jacky [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, 10 April, 2001 1:53 PM Subject: Re: [PHP] while loop On Tue, 10 Apr 2001 15:16, Zeus wrote: $query = mysql_q

[PHP] while loop

2001-04-09 Thread Jacky
Hi people I am more like ASP programmer and new to PHP, In ASP, when we want to take all records in dayabase to display. After we did do the query, we call " Do while not RS.EOF ( mean do while not end of record file) , and display record accroding to the query. Is there anything that do teh

Re: [PHP] while loop

2001-04-09 Thread Lindsay Adams
On 4/10/01 6:22 AM, "Jacky" [EMAIL PROTECTED] wrote: Hi people I am more like ASP programmer and new to PHP, In ASP, when we want to take all records in dayabase to display. After we did do the query, we call " Do while not RS.EOF ( mean do while not end of record file) , and display

Re: [PHP] while loop

2001-04-09 Thread David Robley
On Tue, 10 Apr 2001 22:52, Jacky wrote: Hi people I am more like ASP programmer and new to PHP, In ASP, when we want to take all records in dayabase to display. After we did do the query, we call " Do while not RS.EOF ( mean do while not end of record file) , and display record accroding to

Re: [PHP] while loop

2001-04-09 Thread Michael Hall
$query = mysql_query("some SQL here"); while ($row = mysql_fetch_array($query)) { do stuff; } Mick On Tue, 10 Apr 2001, Jacky wrote: Hi people I am more like ASP programmer and new to PHP, In ASP, when we want to take all records in dayabase to display. After we did do the query,

Re: [PHP] while loop

2001-04-09 Thread Zeus
$query = mysql_query("some SQL here"); while ($row = mysql_fetch_array($query)) { do stuff; } Isn't this suppose to be an infinite loop? while ($row is assigned to mysql_fetch_array($query)) { do stuffs; } someone correct me if I'm wrong? Zeus -- PHP General Mailing List

RE: [PHP] while loop

2001-04-09 Thread Jason Murray
Isn't this suppose to be an infinite loop? while ($row is assigned to mysql_fetch_array($query)) { do stuffs; } someone correct me if I'm wrong? They key here is that there's a single "=" in the condition. ? while ($row = mysql_fetch_array($query)) { } ? ... this is actually

Re: [PHP] while loop

2001-04-09 Thread Zeus
PROTECTED] Sent: Tuesday, 10 April, 2001 1:53 PM Subject: Re: [PHP] while loop On Tue, 10 Apr 2001 15:16, Zeus wrote: $query = mysql_query("some SQL here"); while ($row = mysql_fetch_array($query)) { do stuff; } Isn't this suppose to be an infinite loop? while ($row i

Re: [PHP] while loop

2001-04-09 Thread [EMAIL PROTECTED]
s [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Michael Hall [EMAIL PROTECTED]; Jacky [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 12:58 AM Subject: Re: [PHP] while loop Isn't the '=' operator suppose to be used for assigning and not for evaluation. I thought '==' should b

Re: [PHP] while loop

2001-04-09 Thread Brian Clark
Hi Jacky, @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote: Here I got this script: $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER BY start_date ASC"; $resultofrs = mysql_query($queryoffers, $connection) or die(mysql_error()); while($row =

Re: [PHP] while loop

2001-04-09 Thread Brian Clark
Hi Zeus, @ 1:58:56 AM on 4/10/2001, Zeus wrote: Isn't the '=' operator suppose to be used for assigning and not for evaluation. In this case, it /is/ used for assignment. print $row['some_column']; ... Isn't this suppose to be an infinite loop? while ($row is assigned to

Re: [PHP] while loop

2001-04-09 Thread Jack Dempsey
Zeus wrote: Isn't the '=' operator suppose to be used for assigning and not for evaluation. yup. I thought '==' should be used in this context? nope. Thing is, you ARE assigning. Here's a breakdown of the controlling part of the loop in english: ---while ($row =

Re: [PHP] while loop

2001-04-09 Thread [EMAIL PROTECTED]
u set for yourself" - Original Message - From: Brian Clark [EMAIL PROTECTED] To: PHP is not a drug. [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 1:05 AM Subject: Re: [PHP] while loop Hi Jacky, @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote: Here I got this script: $queryoffers

[PHP] while loop and modulus?

2001-02-27 Thread James, Yz
OK, using this code: ? echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic']; echo "td$smallpic/td\n"; if (($photocount % 3) == 2) { echo "/tr\ntr\n"; } $photocount++; } echo "/tr\n"; echo

RE: [PHP] while loop and modulus?

2001-02-27 Thread DanO
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 11:18 AM To: [EMAIL PROTECTED] Subject: [PHP] while loop and modulus? OK, using this code: ? echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) {