[PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a select * from on and then take that result, do some field/data manpulation, and then insert row-by-row to another table. The problem is the result

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
. David -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 4:16 PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
w/o disk swapping then that would be the fastest way to do this? David -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 4:50 PM To: David Yee Cc: 'php-general@lists.php.net' Subject: Re: [PHP] PHP mysql data result set compression Hi David, From

[PHP] Detecting case change?

2005-07-21 Thread David Yee
Hi- how can I find the character postion in a string right before the first case change? Is there a function out there that already does this? E.g. passing the string WebApplication to this function would return the number 2. Thanks for any input. David -- PHP General Mailing List

RE: [PHP] Detecting case change?

2005-07-21 Thread David Yee
That'll work- didn't realize you can compare strings like that in PHP- thanks guys. David -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 3:38 PM To: Philip Hallstrom Cc: David Yee; PHP-General Subject: Re: [PHP] Detecting case change

[PHP] Check for parse errors right after edit

2004-05-10 Thread David Yee
Hi- what's the best way to automatically check for parse errors after editing a php script with vi or vim? I suppose that php -l name_of_script can be ran after exiting, but I wouldn't want that command to be ran after running vim everytime. Or maybe there's a plugin for vim that will do this?

[PHP] POST/GET using a proxy server

2003-07-27 Thread David Yee
Hi all- how do I modify the following function to work over a proxy server? Thanks for any help. David /* sendToHost * ~~ * Params: * $host - Just the hostname. No http:// or /path/to/file.html portions * $method- get or post, case-insensitive *

[PHP] Easiest way to forward email using imap functions?

2003-06-11 Thread David Yee
Hi all- I'm wondering what's the easiest way to forward a message using the imap functions. The emails I want to forward have attachments so I'm hoping there's an easy way to do this. Or do I have to break down the messages and then send via imap_mail_compose()? BTW the email address I want to

Re: [PHP] Who can tell me the best php-base webmail?

2003-01-02 Thread David Yee
Joskey- Squirrel Mail is pretty good- www.squirrelmail.org David - Original Message - From: [EMAIL PROTECTED] To: PHP Mail List [EMAIL PROTECTED] Sent: Monday, December 02, 2002 4:30 AM Subject: [PHP] Who can tell me the best php-base webmail? Thank you for reading my mail!

Re: [PHP] How to give parameters to a console php-script?

2003-01-02 Thread David Yee
Martin- the command line switches are stored in the $_SERVER['argv'] array. E.g. php -q myscript.php4 1000 The value of $_SERVER['argv'][1] in the myscript.php4 script would be 1000. David - Original Message - From: Martin Thoma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday,

[PHP] Upgrading PHP on Redhat

2002-09-08 Thread David Yee
Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on a Red Hat system? Usually I just get the PHP tarball compile it myself but for this particular machine I just want to upgrade the Redhat PHP that's on the system. As you guys know Redhat puts its PHP (and Apache) files

[PHP] Change user agent when using file() or fopen()

2002-08-29 Thread David Yee
How do I change the browser name and version presented to the target web server when I use file() or fopen()? E.g. ?php $content = file('http://foo.bar/foo.html'); ? The access_log for the web server will show something like: 127.0.0.1 - - [29/Aug/2002:00:08:59 -0700] GET /foo.html HTTP/1.0

Re: [PHP] Protocol on handling empty checkbox values

2002-08-20 Thread David Yee
do will be 'Y'. Justin French on 17/08/02 4:24 AM, David Yee ([EMAIL PROTECTED]) wrote: Hi all. For a universal form script I'm writing I want to store a 'Y' in a table field if a checkbox is checked and an 'N' if it's not. The problem is that when the form is posted

Re: [PHP] Protocol on handling empty checkbox values

2002-08-17 Thread David Yee
It's not PHP's fault -- it's the CGI/POST specs. The browser is not sending it through, because that's what it was told to do :) Ah- got it. That would make sense since it's the browser that's send the form data to the server, and if it doesn't chose to I wonder why the CGI/POST specs

[PHP] Protocol on handling empty checkbox values

2002-08-16 Thread David Yee
Hi all. For a universal form script I'm writing I want to store a 'Y' in a table field if a checkbox is checked and an 'N' if it's not. The problem is that when the form is posted if the checkbox is not checked the checkbox variable is not passed. E.g. form method=POST action=submit.php input

Re: [PHP] Protocol on handling empty checkbox values

2002-08-16 Thread David Yee
I'd use an array on some way, but the other option is to see if the var is set, else set it to N if(isset($_POST['my_checkbox_var'])) { $_POST['my_checkbox_var'] = 'N'; } Probably what I'd do is create an array for the possible checkbox values, then USE THAT ARRAY to build the form.

Re: [PHP] How to call method from another class

2002-02-03 Thread David Yee
Thanks Joel. I thought Sandeep meant I should create object A within object B in order to refer to the method in object A, but I guess that won't work. David - Original Message - From: Joel Boonstra [EMAIL PROTECTED] To: Sandeep Murphy [EMAIL PROTECTED] Cc: 'David Yee' [EMAIL PROTECTED

[PHP] Accessing piped data in PHP shell script

2002-01-31 Thread David Yee
How can I access data/parameters piped into a PHP shell script? E.g: cat foo.txt | php -q myscript.php In this example I want to take the contents of foo.txt and store it into a variable/array in myscript.php. I tried $argv[] but no go. Thanks. David -- PHP General Mailing List

Re: [PHP] Accessing piped data in PHP shell script

2002-01-31 Thread David Yee
Oops, nevermind- I found the answer: $fp = fopen(php://stdin, r); while(($buf=fgets($fp, 512)) != false) { $input .= $buf; } echo $input; - Original Message - From: David Yee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 31

[PHP] PHP file checksum function?

2002-01-30 Thread David Yee
Is there a file checksum function available for PHP? I want to use md5_file() but that's only in the CVS version of PHP4. The files I want to derive the checksums for can be quite large (50+ megs) so the faster the function the better (i.e. maybe the function just reads parts of the file file).

[PHP] How to call method from another class

2002-01-28 Thread David Yee
If I have a PHP class (let's say it's called ClassA), how do I call a method from another class (ClassB) within ClassA? Thanks. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

Re: [PHP] How to call method from another class

2002-01-28 Thread David Yee
Got it- thanks Sandeep. David - Original Message - From: Sandeep Murphy [EMAIL PROTECTED] To: 'David Yee' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, January 28, 2002 11:12 AM Subject: RE: [PHP] How to call method from another class first create an instance of class B like

[PHP] Quick regular expressions question / preg_replace

2002-01-04 Thread David Yee
Hi guys. Quick regular expressions question here: I want to match: html but not: blah blah html Basically I want to wipe out lines beginning with the html tag followed immediately by a carriage return. If I do a: str_replace(html\r\n, '', $string); It wipes out html and the carriage

Re: [PHP] Quick regular expressions question / preg_replace

2002-01-04 Thread David Yee
That's an idea but it would delete the carriage return before it which I don't want to happen. I've tried preg_replace(/^html\r\n/, '', $string) + quite a few other variations but no luck :-(. Argh! David - Original Message - From: Bogdan Stancescu [EMAIL PROTECTED] To: David Yee

Re: [PHP] Quick regular expressions question / preg_replace

2002-01-04 Thread David Yee
Ah that would do it (just need to double quote the \r\n). Thanks! I just know, however, one of these days I'm gonna need to use preg_replace :-). David - Original Message - From: Bogdan Stancescu [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday

[PHP] find all the numeric positions of a character that appears in a string multiple times

2002-01-03 Thread David Yee
Hi guys. What is the best way to find all the numeric positions of a character that appears in a string multiple times? E.g. let's say I have the following string: $str = a href=http://foo.barbtest/b/a; And I want to parse the string and extract everything between . Now if the string only

Re: [PHP] find all the numeric positions of a character that appears in a string multiple times

2002-01-03 Thread David Yee
Thanks Kevin- yeah I guess I'll have to chop up the string. David - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 12:30 PM Subject: Re: [PHP] find all the numeric positions of a character

Re: [PHP] find all the numeric positions of a character that appears in a string multiple times

2002-01-03 Thread David Yee
{ return $result; } } David - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 12:30 PM Subject: Re: [PHP] find all the numeric positions of a character that appears in a string multiple times SPLIT

[PHP] PHP as a web browser?

2001-12-16 Thread David Yee
Is it possible to have PHP act like a web browser, accept cookies and post data (for login)? I'm not sure exactly where to start- I know you can use fopen/file to retrieve url's but I'm not too sure about the other steps. I would like to write and run such a php script as a cron job and have it

[PHP] Can PHP take input from the command prompt interactively?

2001-11-24 Thread David Yee
Can I write a command line PHP script like the following: php -q test.php Output: == 1)choice A 2)choice B 3)choice C Please enter an option: 1 == Thanks. David

[PHP] Quick array question

2001-10-30 Thread David Yee
Hi. Is there an array function that deletes an array element (that's not at the beginning or the end of the array) and return the resultant array? E.g. this is what I want to do: $a = array(1, 2, 3, 4, 5); $b = array_element_delete_function($a, 2); $b now has 4 elements with the following

Re: [PHP] Quick array question

2001-10-30 Thread David Yee
] To: David Yee [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 10:49 AM Subject: RE: [PHP] Quick array question Just found this in the manual notes http://www.php.net/manual/en/ref.array.php To delete an element from an array in an easy way, use unset($array[element

Re: [PHP] Quick array question

2001-10-30 Thread David Yee
Got it- thanks Philip. David - Original Message - From: Philip Olson [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 11:27 AM Subject: Re: [PHP] Quick array question Check out this post: http://marc.theaimsgroup.com/?l=php

Re: [PHP] Quick array question

2001-10-30 Thread David Yee
, 5), but I want (1, 2, 3, 4). Thanks. David - Original Message - From: Sam Masiello [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 10:53 AM Subject: Re: [PHP] Quick array question Very interesting delete function.. I assume $b should have

Re: [PHP] Best way to duplicate tables to another DB using PHP

2001-10-03 Thread David Yee
N Chand To: David Yee Sent: Wednesday, October 03, 2001 6:09 AM Subject: Re: [PHP] Best way to duplicate tables to another DB using PHP use mysql statement mysql_dump thru php. /sagar - Original Message - From: David Yee To: [EMAIL PROTECTED] Sent

Re: [PHP] Best way to duplicate tables to another DB using PHP

2001-10-03 Thread David Yee
can do something like: for ($i=0; i++; i$num_rows_in_table){ $q=select * from my_table where id = $i; $result=odbc_exec($connect, $q); etc. (e.g. insert into the target mysql DB/table) } David - Original Message - From: Joseph Koenig [EMAIL PROTECTED] To: David Yee [EMAIL PROTECTED

[PHP] Best way to duplicate tables to another DB using PHP

2001-10-02 Thread David Yee
Hi guys. What do you suggest is the best (fastest, most efficient) way to duplicate a table from one database to another using PHP? I have a windows machine setup with ODBC for this old school DB (Pervasive SQL 7) and I would like to duplicate some of the tables into a Linux box with MySQL for

[PHP] APC - is it working?

2001-09-16 Thread David Yee
I just installed APC (Alternative PHP Cache). How do I know it's loaded/running/working? Thanks. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

[PHP] if(isset($a)) vs if($a)

2001-09-14 Thread David Yee
Hi. What is the difference between: if(isset($a)) and if($a) ??? Thanks. David