Re: [PHP] increment numbers...

2003-01-13 Thread Senani
ED]> Sent: Monday, January 13, 2003 10:21 PM Subject: [PHP] increment numbers... HI all, I need help on incrementing numbers starting with a 0 or more on php-4.2.3. When I increment a number like 2 (2++). Its out put is 3 ( not 3). But Its output had

Re: [PHP] increment numbers...

2003-01-13 Thread Rick Emery
$num = sprintf("%05d",$num); - Original Message - From: "Senani" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 10:21 PM Subject: [PHP] increment numbers... HI all, I need help on incrementing numbers startin

RE: [PHP] increment numbers...

2003-01-13 Thread Senani
ou want? -Original Message- From: Senani [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] increment numbers... HI all, I need help on incrementing numbers starting with a 0 or more on php-4.2.3. When I increme

RE: [PHP] increment numbers...

2003-01-13 Thread Sean Malloy
for ($i = 1; $i <= 100; $i++) { echo str_pad($i, 6, '0', STR_PAD_LEFT) . ''; } is that the sort of effect you want? -Original Message- From: Senani [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] increm

[PHP] increment numbers...

2003-01-13 Thread Senani
HI all, I need help on incrementing numbers starting with a 0 or more on php-4.2.3. When I increment a number like 2 (2++). Its out put is 3 ( not 3). But Its output had leading 0s on php-4.0.2. Does anybody know any function or any other simple way to do th

Re: [PHP] Increment

2002-06-30 Thread Mirza Muharemagic
Hi Uma, when u make a query, make it for two rows. than show the 1st one, and per psot method send the id of the next row to the next query. $last_id = $_POST["id"]; $result = select id, yourcolumns from table ... limit $last_id, 2 $secondrow =

RE: [PHP] Increment

2002-06-30 Thread Martin Towell
on the "next" link have some sort of counter that lets you know which record to display. If that counter isn't present, then display the first record HTH Martin -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 4:52 PM To: PH

[PHP] Increment

2002-06-30 Thread Uma Shankari T.
Hello, Can anyone please clear my doubt... Actually i am retrieving the entire record details from the database..I want to display 1 row at a time..after clicking a button i want to display the next record..after clicking the next button i want to display the 3 record and so on..How do i go ab

Re: [PHP] Increment a value in a MySQL database with one query?

2002-03-16 Thread Kevin Stone
TED]> Sent: Saturday, March 16, 2002 2:02 AM Subject: Re: [PHP] Increment a value in a MySQL database with one query? > On Sat, 16 Mar 2002, Kevin Stone wrote: > > Is there a MySQL function that I can use to increment the integer value of a row entry with one query? > > > &g

Re: [PHP] Increment a value in a MySQL database with one query?

2002-03-16 Thread mnc
On Sat, 16 Mar 2002, Kevin Stone wrote: > Is there a MySQL function that I can use to increment the integer value of a row >entry with one query? > > Here's the combined PHP and SQL in psuedo code form... > UPDATE mytable SET myval++ > > Something like that. So I dont have to pull the value fr

[PHP] Increment a value in a MySQL database with one query?

2002-03-16 Thread Kevin Stone
Is there a MySQL function that I can use to increment the integer value of a row entry with one query? Here's the combined PHP and SQL in psuedo code form... UPDATE mytable SET myval++ Something like that. So I dont have to pull the value from the database, increment it, then post it back to

Re: [PHP] Increment alphabetical character (simple question)

2002-02-12 Thread Michael Sims
At 04:58 PM 2/12/2002 -0600, phantom wrote: >How do I get the ASCII value of a character increment it by one... >and convert back to a character. > >For example: > >I want to grab a char such as "C" and increment it to "D" ??? To answer your first question: "; //Outputs 'C' $letter = chr(or

[PHP] Increment alphabetical character (simple question)

2002-02-12 Thread phantom
How do I get the ASCII value of a character increment it by one... and convert back to a character. For example: I want to grab a char such as "C" and increment it to "D" ??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Increment help..please

2002-01-24 Thread Erik Price
I just learned about a cool function -- "mysql_insert_id()". You can read about it in the manual, but it sounds like it could be used to get the AUTO_INCREMENT number from the database and you can then append that number to your uploaded image file name. Erik On Thursday, January 24, 2002, a

Re: [PHP] Increment help..please

2002-01-24 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I did that with this script and it works fine, but the reason I am doing it > is so I can then give the image which is uploaded the story ID. But for some > reason I can't get it to work... here is the auto_increment script any ideas > o

Re: [PHP] Increment help..please

2002-01-24 Thread will hives
PROTECTED]> > Sent: Thursday, January 24, 2002 1:43 PM > Subject: [PHP] Increment help..please > > >> please help I'm a newb and this is really messing with my head. All I want >> to know is what do I need to add to this script to allow it to increment > the >

Re: [PHP] Increment help..please

2002-01-24 Thread Dennis Moore
ED]> Sent: Thursday, January 24, 2002 2:43 PM Subject: [PHP] Increment help..please > please help I'm a newb and this is really messing with my head. All I want > to know is what do I need to add to this script to allow it to increment the > ID number. pleasee. > thank you

Re: [PHP] Increment help..please

2002-01-24 Thread Jason Bell
In your database, make the ID column AUTO_INCREMENT, and then simply don't specify a value for it when you insert. - Original Message - From: "will hives" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 11:43 AM Subject: [

Re: [PHP] Increment help..please

2002-01-24 Thread Tyler Longren
Why don't you just set auto_increment on the id field in the database table? Tyler - Original Message - From: "will hives" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 1:43 PM Subject: [PHP] Increment help..please > plea

[PHP] Increment help..please

2002-01-24 Thread will hives
please help I'm a newb and this is really messing with my head. All I want to know is what do I need to add to this script to allow it to increment the ID number. pleasee. thank you very much for a simple boy Will my contact management system: add a contact Name & ema