[PHP-DB] Splitting a string by a ,

2003-12-05 Thread Chris Payne
Hi there everyone, I'm trying to split a string into an Array by a , but I kepe getting errors. Looking at the PHP manual, I thought it would be this way: $keywords = preg_split(,, $email); But it keeps saying that the , isn't an ending delimiter? Any help would be appreciated, i'm trying to

Re: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Jason Wong
On Friday 05 December 2003 15:23, Chris Payne wrote: I'm trying to split a string into an Array by a , but I kepe getting errors. Looking at the PHP manual, I thought it would be this way: $keywords = preg_split(,, $email); But it keeps saying that the , isn't an ending delimiter? Study

Re: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Karsten Eichentopf
I'm trying to split a string into an Array by a , but I kepe getting errors. Looking at the PHP manual, I thought it would be this way: $keywords = preg_split(,, $email); Hi, if you just want to split a a,b to array(a,b) you can use explode wich would wourd as you wrote above. $keywords =

[PHP-DB] transaction locking

2003-12-05 Thread Aleks Kalynovych
Good morning all, I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I dont save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all get the same ID

Re: [PHP-DB] transaction locking

2003-12-05 Thread John W. Holmes
Aleks Kalynovych wrote: I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I dont save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all get the same

Re: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
Aleks, Many programmers learned the hard way that the scheme you are proposing did not work when they went from a single user to a networked environment. You've not said what database you are using. If MySQL you can let it's autoincrement increase your key automatically, perhaps feed it back

RE: [PHP-DB] transaction locking

2003-12-05 Thread Aleks K
Thanks Miles and John for you answers... Yes I am using MySQL. I think I can work it to use the dB to generate these. I ran into The problem originally because this dB was taking up where a different Tool was ending and I needed to start with a specific number scheme. Here Is a though... If I

RE: [PHP-DB] transaction locking

2003-12-05 Thread Opec Kemp [ q u a s a r z ]
Hi, Aleks Kalynovych wrote: I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I dont save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all

RE: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Paul Miller
if the emails are in a CSV file, you can also use fgetcsv ?php $handle = fopen (test.csv,r); while ($data = fgetcsv ($handle, 1000, ,)) { $num = count ($data); for ($c=0; $c $num; $c++) { print $data[$c] . br\n; } } fclose ($handle); ? - Paul -Original Message-

RE: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
Aleks, Every time I've dumped and moved a database with autoincrement fields the numbering has picked up where it left off. Dump the database, including the data, adjust the field type in the database schema, and reload. Regards - Miles At 09:36 AM 12/5/2003 -0500, Aleks K wrote: Thanks

RE: [PHP-DB] Re: Oracle/PHP Issue

2003-12-05 Thread Paul Miller
Nope, that was not it? Still giving me the *** ORA-12545: Connect failed because target host or object does not exist *** error. Hm - Paul -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 4:23 PM To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Dillon, John
I don't wish to hyjack this string but there is a module in perl for extracting emails from files, I could not get it to work but wonder is there any pre-written function in php that would parse text and extract the emails. I wish to do it with pst files, ie people who have written to me over

Re: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Karsten Eichentopf
John Dillon schrieb: I don't wish to hyjack this string but there is a module in perl for extracting emails from files, I could not get it to work but wonder is there any pre-written function in php that would parse text and extract the emails. I wish to do it with pst files, ie people who have

Re: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Ray
have you checked the function explode? http://www.php.net/manual/en/function.explode.php explode (PHP 3, PHP 4 ) explode -- Split a string by string Description array explode ( string separator, string string [, int limit]) On Friday 05 December 2003 09:32, you wrote: I don't wish to hyjack

[PHP-DB] Web counter question..

2003-12-05 Thread James Hatridge
Hi all.. I just put up my stamp bulletin on line (issue #100!!). I have a problem with it. The counter that I use counts everyone every time they look at the site. I want a better counter, can you all suggest one? It's got to work with html and php only. Thanks, JIM PS Check out my stamp

Re: [PHP-DB] Web counter question..

2003-12-05 Thread Matt Matijevich
snip James Hatridge [EMAIL PROTECTED] 12/5/2003 10:52:52 AM Hi all.. I just put up my stamp bulletin on line (issue #100!!). I have a problem with it. The counter that I use counts everyone every time they look at the site. I want a better counter, can you all suggest one? It's got to work