Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jim Lucas
On 8/11/2011 9:34 AM, Jason Pruim wrote: > > Hey Jim, > > Would that still hold true with inserting into a database which is the true > end of it? This is going to be a one time thing I'm doing and I'm trying to > make it a learning experience as I go since that's what everything should be > r

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Jason Pruim pru...@gmail.com On Aug 11, 2011, at 11:52 AM, Jim Lucas wrote: > On 8/10/2011 6:22 PM, Jason Pruim wrote: >> So here I am attempting to generate some numbers to be inserted into a >> database... eventually they will make up a phone number (Which I've emailed >> about before and k

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Jason Pruim pru...@gmail.com On Aug 11, 2011, at 9:35 AM, Andrew Ballard wrote: > On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim wrote: >> So here I am attempting to generate some numbers to be inserted into a >> database... eventually they will make up a phone number (Which I've emailed >> ab

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jim Lucas
On 8/10/2011 6:22 PM, Jason Pruim wrote: > So here I am attempting to generate some numbers to be inserted into a > database... eventually they will make up a phone number (Which I've emailed > about before and know about the bad ideas with it.. But it's the customer :)) > > Here is the code I

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Andrew Ballard
On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim wrote: > So here I am attempting to generate some numbers to be inserted into a > database... eventually they will make up a phone number (Which I've emailed > about before and know about the bad ideas with it.. But it's the customer :)) > > Here is t

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Ashley Sheridan
Jason Pruim wrote: >Replies below > > >Jason Pruim >li...@pruimphotography.com > > > >On Aug 10, 2011, at 11:08 PM, Ken Robinson wrote: > >> At 09:22 PM 8/10/2011, Jason Pruim wrote: >>> So here I am attempting to generate some numbers to be inserted into >a database... eventually they will mak

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Florian Lemaitre
Le 11/08/2011 13:08, Tamara Temple a écrit : On Aug 10, 2011, at 8:22 PM, Jason Pruim wrote: while ($num != "1") { Problem is here ^ You are testing a numeric $num with a string "1", which $num will *never* equal. Leave off the quotes on the number. Hum, I suggest you read this

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Tamara Temple
On Aug 10, 2011, at 8:22 PM, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :)) Here is the cod

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Jason Pruim
Replies below Jason Pruim li...@pruimphotography.com On Aug 10, 2011, at 11:08 PM, Ken Robinson wrote: > At 09:22 PM 8/10/2011, Jason Pruim wrote: >> So here I am attempting to generate some numbers to be inserted into a >> database... eventually they will make up a phone number (Which I've

RE: [PHP] Problem with inserting numbers...

2011-08-11 Thread Dajka Tamás
om: Tim Streater [mailto:t...@clothears.org.uk] Sent: Thursday, August 11, 2011 11:22 AM To: Jason Pruim Cc: PHP General List Subject: Re: [PHP] Problem with inserting numbers... On 11 Aug 2011 at 02:22, Jason Pruim wrote: > while ($num != "1") { >while($row = mysql_fetch_as

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Tim Streater
On 11 Aug 2011 at 02:22, Jason Pruim wrote: > while ($num != "1") { >while($row = mysql_fetch_assoc($result)) { >$padnum = number_pad($num, "4"); >echo $row['areacode'] . "-" . $row['prefix'] . "-" . $padnum . ""; >$num++; >} > > > } This is certain to fail.

Re: [PHP] Problem with inserting numbers...

2011-08-10 Thread Ken Robinson
At 09:22 PM 8/10/2011, Jason Pruim wrote: So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :)) Here is the code I am work

Re: [PHP] Problem with inserting numbers...

2011-08-10 Thread 李白|字一日
when $num++; executed $num will never be '1'; you may change the while loop to while ($num < 1) { while ($row = ... 2011/8/11 Jason Pruim > On Aug 10, 2011, at 9:36 PM, MUAD SHIBANI wrote: > > > Basically you can increase time limit for this file to handle your > request by usi

Re: [PHP] Problem with inserting numbers...

2011-08-10 Thread Chris Stinemetz
> > basically all I'm trying to do is generate the last 4 digits starting at > and going up to . for testing purposes I'm just echoing back but will > eventually insert the complete number back into the database as a 7 digit > string. > > The error I'm getting is: > > Fatal error: Maxim

Re: [PHP] Problem with inserting numbers...

2011-08-10 Thread Jason Pruim
On Aug 10, 2011, at 9:36 PM, MUAD SHIBANI wrote: > Basically you can increase time limit for this file to handle your request by > using > set_time_limit function ... Hi Maud, Looked into set_time_limit and even tried running it with a value of "120" but it didn't help... I'm affraid I have

[PHP] Problem with inserting numbers...

2011-08-10 Thread Jason Pruim
So here I am attempting to generate some numbers to be inserted into a database... eventually they will make up a phone number (Which I've emailed about before and know about the bad ideas with it.. But it's the customer :)) Here is the code I am working with: $value) { //echo $key . "-"