php-general Digest 30 Nov 2007 17:51:48 -0000 Issue 5156

2007-11-30 Thread php-general-digest-help
php-general Digest 30 Nov 2007 17:51:48 - Issue 5156 Topics (messages 265287 through 265304): Re: Join question 265287 by: Robert Cummings 265290 by: Jochem Maas 265293 by: Daniel Brown 265302 by: Daniel Brown 265303 by: Jochem Maas Re: Dynamic

Re: [PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread TG
I suck at regex.. but found this a while ago. Supposedly it'll strip all non-numeric characters, so I've used it for phone #'s and SSNs: preg_replace ('/[^\d]+/s', '', $var) -TG - Original Message - From: afan pasalic [EMAIL PROTECTED] To: php-general php-general@lists.php.net Date:

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Dan Shirah
I tried a different approach with the code below: if ($num_rows 0 $barcode_id == ) { echo The query found .$num_rows. row(s); $call_procedure = CALL informix.updt_brcd_id_req('$case', '$event_date', '$event_sequence', '$event_code'); $call_result = ifx_query($connect_id, $call_procedure); }

[PHP] Before to submission RFC datas

2007-11-30 Thread Norde-Amijkzegl Tomas
All of yous people, hi! I seeing yesterday on the Googles for RFC 0001 so I asking you to enforce you helping My head from pain before I submissioning the Officials. For before to submission RFC Datas to Ietf on List Proposals, I asking much discussionality by Community. I proposing smartly

[PHP] Hellos?

2007-11-30 Thread Norde-Amijkzegl Tomas
I for getting You helps on this Important Question? RFC do not write itselfs for Onlines. Fastly responsing me for stopping accessing by make Law for RFC. Then Internet President stopping all accessing from Nigeria right soon. Yes! No more stolens of Identities and Passwords. No more

RE: [PHP] Re: PHP/AJAX File DragDrop

2007-11-30 Thread Warren Vail
I think the risk is that the path shows lots of information about how your system is configured that is not necessary to transfer the file, so, for example if uploading something from you My Documents folder on windoz, why reveal what username you use for system signon, no sense leaving the door

[PHP] Re: PHP/AJAX File DragDrop

2007-11-30 Thread Dan
Unfortunatly javascript can't access the filesystem so it can't get filenames. The closest way you could do something like this would be to use Java (not javascript, totally different). It's a permissions thing, just the way JS and everything else is designed. - Dan Andrei Verovski (aka

Re: [PHP] Calling parent function with call_user_func_array

2007-11-30 Thread Tommy Baggett
Thanks for the great advice! That did the trick and made me realize an even simpler solution to my needs in the process. I needed to iterate the pages in reverse to store the page ID of the last li element of each ul element before allowing the walker class to do its work. This allowed

RE: [PHP] Re: PHP/AJAX File DragDrop

2007-11-30 Thread Andrés Robinet
You can also use the FileReference ActionScript class in flash. This will not allow you to drop a file and get it uploaded (will it?) but it supports multiple file selection. There are some implementations in javascript that make use of this flash feature to upload multiple files interactively

Re: [PHP] PHP/AJAX File DragDrop

2007-11-30 Thread Stephen Edberg
On Sat, 1 Dec 2007, Andrei Verovski (aka MacGuru) wrote: Hi ! Anyone knows PHP/AJAX library which allows to get full path of file dropped into web browser's window area? It is required for document archiving system in order to avoid multiple (or to be more precise, almost endless) usage of

Re: [PHP] Join question

2007-11-30 Thread tedd
At 10:21 AM +0800 11/30/07, Crayon Shin Chan wrote: On Friday 30 November 2007, tedd wrote: I'm trying to understand joins, Ask on a database related list. -- Crayon Really? No language lives in a vacuum, mate. Especially, a web language. IMO, one of the major attributes that make PHP

Re: [PHP] Join question [solved]

2007-11-30 Thread tedd
At 9:52 AM -0500 11/30/07, Daniel Brown wrote: On Nov 29, 2007 11:17 PM, Robert Cummings [EMAIL PROTECTED] wrote: Rob, The version difference is probably right on the nose. If I remember correctly, you couldn't do that in the long-popular 3.23, which *gasp!* is still used by some web

Re: [PHP] Before to submission RFC datas

2007-11-30 Thread Jochem Maas
Andrés Robinet wrote: -Original Message- From: Norde-Amijkzegl Tomas [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 8:16 PM To: php-general@lists.php.net Subject: [PHP] Before to submission RFC datas All of yous people, hi! I seeing yesterday on the Googles for RFC

RE: [PHP] Before to submission RFC datas

2007-11-30 Thread Andrés Robinet
-Original Message- From: Norde-Amijkzegl Tomas [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 8:16 PM To: php-general@lists.php.net Subject: [PHP] Before to submission RFC datas All of yous people, hi! I seeing yesterday on the Googles for RFC 0001 so I asking

Re: [PHP] Join question

2007-11-30 Thread Crayon Shin Chan
On Saturday 01 December 2007, tedd wrote: At 10:21 AM +0800 11/30/07, Crayon Shin Chan wrote: On Friday 30 November 2007, tedd wrote: I'm trying to understand joins, Ask on a database related list. Really? Really. No language lives in a vacuum, mate. Especially, a web language. If

Re: [PHP] Join question

2007-11-30 Thread Crayon Shin Chan
On Friday 30 November 2007, Robert Cummings wrote: I'm sorry, allow me to rephrase... in the past 5 months you've made 2 on-topic useful posts, with the rest either being on-topic for an off-topic thread, or completely off-topic. I see no point in saying more, I've made my point. I know your

Re: [PHP] Join question

2007-11-30 Thread Crayon Shin Chan
On Friday 30 November 2007, Jochem Maas wrote: my guess it took less time to search for 'Crayon' in his mail archive than it took you to write the sentence. Is not so much the actual time taken but rather that he had the free time at all. aparently Rob wasn't saying this ... but I would,

RE: [PHP] Join question

2007-11-30 Thread Jay Blanchard
[snip] If you try you can probably make a connection from php to everything under the sun, doesn't mean everything under the sun is an appropriate topic for this list. [/snip] The Oracle of PHP - 6 Degrees of Separation I joined PHP to Oracle, Kevin Bacon and temperature all in one shot.

Re: [PHP] Join question

2007-11-30 Thread tedd
At 12:53 PM +0800 12/1/07, Crayon Shin Chan wrote: On Saturday 01 December 2007, tedd wrote: At 10:21 AM +0800 11/30/07, Crayon Shin Chan wrote: On Friday 30 November 2007, tedd wrote: I'm trying to understand joins, Ask on a database related list. Really? Really. No language

[PHP] Why You doing no talks?

2007-11-30 Thread Norde-Amijkzegl Tomas
You normal responsing fastly, why not for Important Questions like I did for post? You must respond Me now so I can write RFC for stopping they accessing Online right now! Make no more days come! Yes. -Tomas -- View this message in context:

[PHP] Re: how do i get a printout of original multipart post data

2007-11-30 Thread Dan
Olav Mørkrid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello how can i get a raw and untouched printout of a multipart/form-data POST? i need this to analyze what certain user agents do wrong when uploading files. what happens is that php just fails to put files into $_FILES,

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Warren Vail
quite, quite, I was just jesting :-) Oh good, I'll call back the troups,, Warren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 5:16 PM, Dan Shirah [EMAIL PROTECTED] wrote: ALMOST have it! I have changed the code to this: if ($num_rows 0 $barcode_id == ) { echo The query found .$num_rows. row(s); $procedure = Execute Procedure informix.updt_brcd_id_req('$case', '$event_date', '$event_sequence',

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Dan Shirah
ALMOST have it! I have changed the code to this: if ($num_rows 0 $barcode_id == ) { echo The query found .$num_rows. row(s); $procedure = Execute Procedure informix.updt_brcd_id_req('$case', '$event_date', '$event_sequence', '$event_code'); print_r ($procedure); $run = ifx_query($procedure,

Re: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Jochem Maas
Warren Vail wrote: Not to mention that syntax works in the US, but not large portions of the rest of the world. (even with the 1 country code in front). can't remember when that ever stopped an american. e.g. Windows print subsystem that shoves 'Letter' format down your throat as the default

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Warren Vail
Not to mention that syntax works in the US, but not large portions of the rest of the world. (even with the 1 country code in front). Warren vail -Original Message- From: afan pasalic [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 12:03 PM To: Daevid Vincent Cc:

Re: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread afan pasalic
It's ok to store it this way, but it could be a little PITA when search. E.g., you store (123) 456-7890 and somebody search for 123-456-7890? Right? -afan Daevid Vincent wrote: The kind of opposite of this, is what I use, in that it ADDs the () and - if ((strlen($phone)) = 14) $phone =

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Daevid Vincent
The kind of opposite of this, is what I use, in that it ADDs the () and - if ((strlen($phone)) = 14) $phone = preg_replace(/[^0-9]*([0-9]{3})[^0-9]*([0-9]{3})[^0-9]*([0-9]{4}).*/, (\\1) \\2-\\3, $phone); -Original Message- From: afan pasalic [mailto:[EMAIL

RE: [PHP] Calling a stored procedure

2007-11-30 Thread Andrés Robinet
-Original Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 4:00 PM To: Daniel Brown Cc: php-general Subject: Re: [PHP] Calling a stored procedure I tried a different approach with the code below: if ($num_rows 0 $barcode_id == ) { echo The

Re: [PHP] Rewind foreach loop

2007-11-30 Thread Robert Cummings
On Fri, 2007-11-30 at 14:46 -0500, Robert Cummings wrote: This is dangerous use of the array functions. A problem occurs when you have a value that evaluates to false (such as the first entry in the example array :). In fact the only way to ensure you traverse the array properly is to use

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 1:56 PM, Dan Shirah [EMAIL PROTECTED] wrote: I'm not sure if we're on the same page. I have a stored procedure on my Informix server. All I am trying to do is create a simple form that when submitted will pass several parameters to the stored procedure and execute it. I

RE: [PHP] Calling a stored procedure

2007-11-30 Thread Warren Vail
I believe you need to send the call to the stored procedure to the database as if it were a query, instead of asking PHP to execute it. HTH, Warren Vail -Original Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 10:57 AM To: Daniel Brown Cc:

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Dan Shirah
I'm not sure if we're on the same page. I have a stored procedure on my Informix server. All I am trying to do is create a simple form that when submitted will pass several parameters to the stored procedure and execute it. I shouldn't have to pass the head/body/content to the Informix server to

Re: [PHP] Join question

2007-11-30 Thread Daniel Brown
That it is, Steve. That it is. And because of the occasion, I feel justified in celebrating by top-posting. TFGIF! On Nov 30, 2007 12:58 PM, Steve Edberg [EMAIL PROTECTED] wrote: At 10:30 AM -0500 11/30/07, Daniel Brown wrote: On Nov 30, 2007 10:22 AM, Jochem Maas [EMAIL

Re: [PHP] Join question [solved]

2007-11-30 Thread tedd
At 2:00 PM +1100 11/30/07, Chris wrote: Out of curiosity, what SQL server (and version) are you using? I currently have MySQL 5.0.33 on my dev box and I had no problem with the query I gave you. Perhaps it's a version issue. There really shouldn't be a problem updating a table that also occurs

RE: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Warren Vail
I did not know that about Windows Letter formatting, well, not all Americans think everything revolves around the way Americans do things. Knowing a little about Microsoft marketing strategy, they probably feel they should charge extra for providing more flexible formatting. I do believe a good

Re: [PHP] Join question

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 10:22 AM, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: I was tempted to flame Tedd just because he's Tedd. ;-P lol. but then the guy was programming Rocks(tm) way before I was born, that has to count for something :-) Please keep all replies on the

RE: [PHP] Join question

2007-11-30 Thread Andrés Robinet
-Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Saturday, December 01, 2007 2:09 AM To: Crayon Shin Chan; php-general@lists.php.net Subject: Re: [PHP] Join question At 12:53 PM +0800 12/1/07, Crayon Shin Chan wrote: On Saturday 01 December 2007, tedd wrote: At

Re: [PHP] Join question [solved]

2007-11-30 Thread Wolf
tedd [EMAIL PROTECTED] wrote: Hi gang: I found why the JOIN didn't work for me in this instance, which was I needed to create a third table and JOIN what I needed in that table from the other two. My problem was that I was trying to alter one of the tables in the JOIN. While

Re: [PHP] Rewind foreach loop

2007-11-30 Thread Robert Cummings
On Fri, 2007-11-30 at 09:51 -0800, Jim Lucas wrote: Jeffery Fernandez wrote: Hi all, Is it possible to rewind a foreach loop? eg: $numbers = array(0,1,2,3,4,5,6,7,8,9,10); foreach ($numbers as $index = $value) { if ($value == 5) {

Re: [PHP] PHP RFC # 0001 --- List Etiquette

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 10:41 AM, Philip Thompson [EMAIL PROTECTED] wrote: On Nov 28, 2007 9:48 AM, Daniel Brown [EMAIL PROTECTED] wrote: Good morning (/afternoon/evening) all; This is more or less an RFC-type email, hence the subject line. I would like to see your comments on this case,

Re: [PHP] Calling a stored procedure

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 1:39 PM, Dan Shirah [EMAIL PROTECTED] wrote: Hello all, I am having soem difficulty when trying to call an INFORMIX stored procedure with PHP. I have verified that the if() condition is true and all of the parameters I am passing are valid. However, when I run the following:

Re: [PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread Jochem Maas
afan pasalic wrote: hi, I store phone number in mysql as integer, e.g. (123) 456-7890 is stored as 1234567890. though, in search form they usually type in a phone number with parenthesis/space/dashes. I have to extract numbers before I search through mysql. currently, I use

Re: [PHP] Rewind foreach loop

2007-11-30 Thread Jim Lucas
Jeffery Fernandez wrote: Hi all, Is it possible to rewind a foreach loop? eg: $numbers = array(0,1,2,3,4,5,6,7,8,9,10); foreach ($numbers as $index = $value) { if ($value == 5) { prev($numbers); } echo Value: $value . PHP_EOL; } The above

Re: [PHP] Join question

2007-11-30 Thread Daniel Brown
On Nov 30, 2007 8:08 AM, Jochem Maas [EMAIL PROTECTED] wrote: Crayon Shin Chan wrote: On Friday 30 November 2007, Robert Cummings wrote: That's an amusing statement. I took a peek back in time and noticed that in the past 5 months you've only made two on-topic useful posts to the PHP

Re: [PHP] Join question [solved]

2007-11-30 Thread Daniel Brown
On Nov 29, 2007 11:17 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-11-30 at 14:00 +1100, Chris wrote: Out of curiosity, what SQL server (and version) are you using? I currently have MySQL 5.0.33 on my dev box and I had no problem with the query I gave you. Perhaps it's a

Re: [PHP] Rewind foreach loop

2007-11-30 Thread Jochem Maas
Jeffery Fernandez wrote: Hi all, Is it possible to rewind a foreach loop? eg: $numbers = array(0,1,2,3,4,5,6,7,8,9,10); foreach ($numbers as $index = $value) { if ($value == 5) { prev($numbers); } echo Value: $value . PHP_EOL; }

[PHP] Calling a stored procedure

2007-11-30 Thread Dan Shirah
Hello all, I am having soem difficulty when trying to call an INFORMIX stored procedure with PHP. I have verified that the if() condition is true and all of the parameters I am passing are valid. However, when I run the following: if ($num_rows 0 $barcode_id == ) { echo The query found

Re: [PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread afan pasalic
Jochem Maas wrote: afan pasalic wrote: hi, I store phone number in mysql as integer, e.g. (123) 456-7890 is stored as 1234567890. though, in search form they usually type in a phone number with parenthesis/space/dashes. I have to extract numbers before I search through mysql. currently,

Re: [PHP] PHP RFC # 0001 --- List Etiquette

2007-11-30 Thread Philip Thompson
On Nov 28, 2007 9:48 AM, Daniel Brown [EMAIL PROTECTED] wrote: Good morning (/afternoon/evening) all; This is more or less an RFC-type email, hence the subject line. I would like to see your comments on this case, and maybe we can forge some sort of agreement or unofficial treaty or

Re: [PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread Zoltán Németh
2007. 11. 30, péntek keltezéssel 08.44-kor afan pasalic ezt írta: hi, I store phone number in mysql as integer, e.g. (123) 456-7890 is stored as 1234567890. though, in search form they usually type in a phone number with parenthesis/space/dashes. I have to extract numbers before I search

[PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread afan pasalic
hi, I store phone number in mysql as integer, e.g. (123) 456-7890 is stored as 1234567890. though, in search form they usually type in a phone number with parenthesis/space/dashes. I have to extract numbers before I search through mysql. currently, I use eregi_replace() function, several times,

[PHP] Re: Question about urlencode....

2007-11-30 Thread Colin Guthrie
TG wrote: Unless your URL is more complicated than your example, you shouldn't need to use urlencode() at all. You'd need to use it in a case where your string may contain characters that aren't valid in URLs like spaces and such: $baseurl = http://www.somesearchsite.com/search=;;

Re: [PHP] Join question

2007-11-30 Thread Jochem Maas
Crayon Shin Chan wrote: On Friday 30 November 2007, Robert Cummings wrote: That's an amusing statement. I took a peek back in time and noticed that in the past 5 months you've only made two on-topic useful posts to the PHP General list-- and they were both for the same thread. If you have

Re: [PHP] Join question

2007-11-30 Thread chris smith
On Dec 1, 2007 3:53 PM, Crayon Shin Chan [EMAIL PROTECTED] wrote: On Saturday 01 December 2007, tedd wrote: At 10:21 AM +0800 11/30/07, Crayon Shin Chan wrote: On Friday 30 November 2007, tedd wrote: I'm trying to understand joins, Ask on a database related list. Really? Really.

Re: [PHP] Join question

2007-11-30 Thread Jochem Maas
Daniel Brown wrote: On Nov 30, 2007 10:22 AM, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: I was tempted to flame Tedd just because he's Tedd. ;-P lol. but then the guy was programming Rocks(tm) way before I was born, that has to count for something :-) Please keep

Re: [PHP] Join question

2007-11-30 Thread Steve Edberg
At 10:30 AM -0500 11/30/07, Daniel Brown wrote: On Nov 30, 2007 10:22 AM, Jochem Maas [EMAIL PROTECTED] wrote: Daniel Brown wrote: I was tempted to flame Tedd just because he's Tedd. ;-P lol. but then the guy was programming Rocks(tm) way before I was born, that has to count for

Re: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread Jochem Maas
Warren Vail wrote: I did not know that about Windows Letter formatting, well, not all Americans think everything revolves around the way Americans do things. Knowing a little about Microsoft marketing strategy, they probably feel they should charge extra for providing more flexible

[PHP] PHP/AJAX File DragDrop

2007-11-30 Thread Andrei Verovski (aka MacGuru)
Hi ! Anyone knows PHP/AJAX library which allows to get full path of file dropped into web browser's window area? It is required for document archiving system in order to avoid multiple (or to be more precise, almost endless) usage of open file dialogs from the browser. Library should be