Re: [PHP] Any Ideas?

2004-03-22 Thread Robert Cummings
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

Re: [PHP] Any Ideas?

2004-03-22 Thread John W. Holmes
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

Re: [PHP] Any Ideas?

2004-03-22 Thread John W. Holmes
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

Re: [PHP] Any Ideas?

2004-03-22 Thread Matthew Oatham
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

Re: [PHP] Any Ideas?

2004-03-22 Thread Raditha Dissanayake
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

Re: [PHP] Any Ideas?

2004-03-22 Thread Matthew Oatham
-%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

RE: [PHP] Any Ideas?

2004-03-22 Thread Chris W. Parker
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

Re: [PHP] Any Ideas?

2004-03-22 Thread Robert Cummings
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

Re: [PHP] Any Ideas?

2004-03-22 Thread John W. Holmes
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

Re: [PHP] Any Ideas @ becomes _Xy

2002-05-20 Thread Analysis Solutions
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

RE: [PHP] Any Ideas @ becomes _Xy

2002-05-20 Thread Scott Hurring
-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

RE: [PHP] Any ideas on content management system for Apache+PHP+MySQL

2002-05-02 Thread Jay Blanchard
[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

Re: [PHP] Any ideas on combining arrays????

2002-04-05 Thread Michael Virnstein
perhaps: $FFR = array(TU4R = array(data = array(array(count = TU4R is 0), array(count = TU4R is 1), array(count = TU4R is 2))), PH01 = array(data = array(array(count = PH01 is 0;

RE: [PHP] Any ideas on combining arrays????

2002-04-03 Thread Rick Emery
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

Re: [PHP] Any ideas on combining arrays????

2002-04-03 Thread Hugh Bothwell
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

Re: [PHP] any ideas : Unexpected character

2002-02-14 Thread Girish Nath
Hi I got this error : Warning: Unexpected character in input: ' in /home/altdesign/public_html/php/new admin/do_addauthor.php on line 14 Can you post the section around Line 14 from do_addauthor.php so we can take a look at it ? Regards Girish -- www.girishnath.co.uk - Original

Re: [PHP] any ideas : Unexpected character

2002-02-14 Thread Will Hives
== image/jpg || $type == image/gif || $type == image/pjpeg || $type == image/jpeg){ // is this a valid image? $time_tmp = time(); $time_tmp = substr($time_tmp, -4); $filename = $time_tmp._.$name; // just in case someone uploads matched

Re: [PHP] Any Ideas

2002-01-28 Thread Jason G.
$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