That also worked .. !!
I tried this function .But used wrong arguments.
Thanks a lot for the help.
Rgds
JanakaA
At 11:25 PM 1/13/2003 -0600, you wrote:
$num = sprintf("%05d",$num);
- Original Message -
From: "Senani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 13,
$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 starting with a 0 or
more on php-4.2.3.
Hi,
Great! I was searching for this days in PHP DOCS. I can
proceed now.
Thanks Again folk.
JanakAA
At 03:30 PM 1/14/2003 +1100, you wrote:
for ($i = 1; $i <= 100; $i++)
{
echo str_pad($i, 6, '0', STR_PAD_LEFT) . '';
}
is that the sort of effect you want?
-Original Me
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] increment numbers...
HI all,
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: PHP
Subject: [PHP]
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
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
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
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
of how to add the ID to the image?? I would be very great ful if
All you need to do is the set the field type for the id similar to :
ID smallint not null primary key auto_increment
you do not need to refer to ID in your insert statement.
/dkm
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January
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: [PHP] Increment help..please
> please
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
> please help I'm a newb and this is rea
15 matches
Mail list logo