Hi,
Sorry to ask this question, I am fairly new to PHP and wanted to ask for some help
with the following.
I have a MySQL table which uses a auto_increment int as the primary key - when I do an
insert I want to create another id based on the primary key and insert this into the
same table
On Mon, 2004-03-22 at 18:51, Matthew Oatham wrote:
Hi,
are there any functions that retrieve the last primary key created in
the MySQL table?
http://www.php.net/manual/en/function.mysql-insert-id.php
Cheers,
Rob.
--
..
| InterJinn
Matthew Oatham wrote:
I have a MySQL table which uses a auto_increment
int as the primary key - when I do an insert I want
to create another id based on the primary key and
insert this into the same table i.e. if I do an
insert and the primary key is 3 I want to generate
the ID CR-003, if
Robert Cummings wrote:
On Mon, 2004-03-22 at 18:51, Matthew Oatham wrote:
Hi,
are there any functions that retrieve the last primary key created in
the MySQL table?
http://www.php.net/manual/en/function.mysql-insert-id.php
If you read the whole question, though, the poster wanted to use the
23, 2004 12:25 AM
Subject: Re: [PHP] Any Ideas?
Robert Cummings wrote:
On Mon, 2004-03-22 at 18:51, Matthew Oatham wrote:
Hi,
are there any functions that retrieve the last primary key created in
the MySQL table?
http://www.php.net/manual/en/function.mysql-insert-id.php
If you
Matthew Oatham wrote:
The idea was that the user uploads a file and I insert details about the
file into the mysql table and rename the file using the generated id.
Even with this scenario you probably can do with out the extra column as
John has suggested.
so if the next primary key is 4 I
-%03d, $key);
return $crId;
}
- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: Robert Cummings [EMAIL PROTECTED]
Cc: Matthew Oatham [EMAIL PROTECTED]; PHP-General
[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 12:25 AM
Subject: Re: [PHP] Any Ideas?
Robert Cummings
Matthew Oatham mailto:[EMAIL PROTECTED]
on Monday, March 22, 2004 4:56 PM said:
can anyone see any
potential problems such as database problems, i.e duplicate keys, bad
coding practices etc... cheers matt
if(!empty($_FILES[cr])) {
$uploaddir = cr/; // set this to wherever
On Mon, 2004-03-22 at 19:25, John W. Holmes wrote:
Robert Cummings wrote:
On Mon, 2004-03-22 at 18:51, Matthew Oatham wrote:
Hi,
are there any functions that retrieve the last primary key created in
the MySQL table?
http://www.php.net/manual/en/function.mysql-insert-id.php
Matthew Oatham wrote:
Bit rough at the moment but I have come up with the following - it doesn't
rename the file using the new ID yet but I am more concerned about my method
for creating the new ID - can anyone see any potential problems such as
database problems, i.e duplicate keys, bad coding
On Sat, May 18, 2002 at 11:45:49AM +0100, Henry wrote:
http://GetResponse.com/k.cgi?a=blahblahf=henry_Xyteacake.force9.co.uk
I subscribed using the email address [EMAIL PROTECTED]
They appear to have translated the @ symbol to _Xy.
Any guess why? Is there a PHP function that does this
-Original Message-
From: Analysis Solutions [mailto:[EMAIL PROTECTED]]
Subject: Re: [PHP] Any Ideas @ becomes _Xy
On Sat, May 18, 2002 at 11:45:49AM +0100, Henry wrote:
http://GetResponse.com/k.cgi?a=blahblahf=henry_Xyteacake.force9.co.uk
I subscribed using the email
Hi All,
I don't think this is a PHP specific issue but I want to use PHP to solve
it.
I'm using GetResponse to supply my autoresponders. They provide an
unsubscribe link at the bottom of the emails as follows:
http://GetResponse.com/k.cgi?a=blahblahf=henry_Xyteacake.force9.co.uk
I subscribed
[snip]
I am a webmaster for an agency.
I looked at many content management pieces for
Linux+Apache+PHP+MySQL like ezPublish and etc. but
they look overly complex for my needs.
I just need to have something that would allow me to
insert picture, text, and list of links into a
template. I don't
I am a webmaster for an agency.
I looked at many content management pieces for
Linux+Apache+PHP+MySQL like ezPublish and etc. but
they look overly complex for my needs.
I just need to have something that would allow me to
insert picture, text, and list of links into a
template. I don't want a
ROTECTED]]
Sent: Wednesday, April 03, 2002 11:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Any ideas on combining arrays
Hi!
Need some ideas on combining some arrays into one! I have array for
data and other array for counter. How do I make an array that would show
different data
Hi!
Need some ideas on combining some arrays into one! I have array for
data and other array for counter. How do I make an array that would show
different data for each counter number?
-- clip --
$FFR = array (
TU4R = array( data = , count = ),
PH01 = array( data
ok...so what problem are you having? what's the error?
your code worked for me, i.e., it compiled and executed
-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Any ideas on combining arrays
I'm not sure I understand what problem
you're trying to solve.
It looks something like the number of times
a given piece of data occurs per user?
Where does the data come from and what
are you trying to accomplish?
Need some ideas on combining some arrays
into one! I have array for
I have put together this script with the help of some of you kind members
here. It seems to do what I set out for it to do, but when it finished the
upload it comes up with the following error:
Unexpected character
try for yourself: http://www.alt-design.net/php/new%20admin/add.php
I would be
Message -
From: Will Hives [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 4:34 PM
Subject: [PHP] any ideas : Unexpected character
I have put together this script with the help of some of you kind members
here. It seems to do what I set out for it to do, but when
]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 4:34 PM
Subject: [PHP] any ideas : Unexpected character
I have put together this script with the help of some of you kind members
here. It seems to do what I set out for it to do, but when it finished the
upload it comes up
$str = ereg_replace('[-!@#$%^*()_+=-\';:/.,?]', '', $str);
You may need to escape some of these characters with \
On the other hand, they are contained in a character class [] so you may
not need to escape them. Note how the `-' is in the beginning.
-Jason Garber
IonZoft.com
At 09:13 AM
Any Ideas how I can remove !@#$%^*()_+=-';:/.,? charactors from a string?
Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012
I am digitalizing a companies Application in an online system. The problem is that
companies they deal with require the app to be signed. Obviously an online application
cannot be signed conventionally. Does anyone know of a way or a work-around to
accomplish this?
25 matches
Mail list logo