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
$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
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
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
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
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 =
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
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
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
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
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
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
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
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
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
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
>
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
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: [
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
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
20 matches
Mail list logo