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
.
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
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
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
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
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?
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
*
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
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!
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,
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
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
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
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
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
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.
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
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
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
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).
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
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
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
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
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
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
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
{
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
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
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
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
]
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
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
, 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
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
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
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
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:
Hi. What is the difference between:
if(isset($a))
and
if($a)
??? Thanks.
David
39 matches
Mail list logo