php-general Digest 24 Mar 2011 18:15:28 -0000 Issue 7241

Topics (messages 312029 through 312032):

Re: Can I modify a MySQL object?
        312029 by: admin.buskirkgraphics.com

Re: Upload Progress Meter
        312030 by: Brad Broerman
        312031 by: Donovan Brooke

Slow sessions.
        312032 by: Rob Adams

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Depends on where you want to manipulate.

In mysql you can

$query = 'select first_name as FNAME from tablename';
In this result you changed the column name from first_name to FNAME for the
result only.


In this example we can change the data returned in a particular field by
using an if statement.


$query = 'select IF(first_name='John','Big Bad John',first_name) FROM
tablename;

If the first_name field contains john we convert the name else just return
the name in the row.

Is that what you wanted?




Richard L. Buskirk
Senior Software Engineer/Systems Administrator

You can't grow your business with systems that are on life support...

-----Original Message-----
From: Brian Dunning [mailto:[email protected]] 
Sent: Wednesday, March 23, 2011 8:07 PM
To: PHP-General List
Subject: [PHP] Can I modify a MySQL object?

Let's say I do a query:

$result = mysql_query("select * from tablename");

Is there some way I can manually update the contents of certain
columns/records in $result? I don't want to actually update MySQL, just the
results that I'm holding in memory for this script. Can I do it without
converting it to a regular array?
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Essentially, they all require Flash or Java... 

Most use Flash...  

If you want one that is in Java, and is scriptable in JavaScript, I have one
on my website: http://www.bbroerman.net/code.html

-Brad


-----Original Message-----
From: Floyd Resler [mailto:[email protected]] 
Sent: Wednesday, March 23, 2011 10:29 AM
To: [email protected]
Cc: PHP
Subject: Re: [PHP] Upload Progress Meter


On Mar 23, 2011, at 10:10 AM, Steve Staples wrote:

> On Wed, 2011-03-23 at 09:59 -0400, Floyd Resler wrote:
>> I am in need of an upload progress meter.  I've seen plenty of tutorials
=
>> on-line requiring installing modules, hooks, patches, etc.  However, my =
>> Wordpress install accomplished this without me having to make any =
>> modifications to my PHP install.  So, how is it done?
>> 
>> Thanks!
>> Floyd
>> 
> 
> you can google this...
> 
> "jquery upload progress meter"
> 
> or:
> http://www.nixboxdesigns.com/demos/jquery-uploadprogress.php
> 
> http://www.bitrepository.com/uploading-files-with-progress-bar.html
> 
> 
> 
> Steve
> 

I'll check it out!

Thanks!
Floyd




--- End Message ---
--- Begin Message ---
Brad Broerman wrote:
Essentially, they all require Flash or Java...


You are generally talking about two different sides of the client/server relationship.. unless you are talking about Applets, right?... so I have an issue with the statement. If jquery does one (as mentioned), it's likely not Flash nor Java.

I'm not trying to be an arse or anything, but I don't see it being that limiting. I do think it's difficult to recommend a progress meter when there is not a lot of
info given of what is being metered. If you need to meter the processes
for javascript, then you'd likely use javascript, if you need to meter
a server-side intensive task, then you could use a server-side method, or a combination of things.

It all comes down to a pretty graphic to watch while your waiting for a task to finish. ;-)

Donovan




--
D Brooke

--- End Message ---
--- Begin Message --- I have a load balanced website with 5 web servers. Currently, they run php 5.1.4 (for pdflib reasons). I'm going to upgrade them, so I removed one from the load balancer and installed php 5.2.17 on it. I originally installed 5.3, but some of the code was causing problems, so I went back to the latest version of 5.2.

The problem I'm having is that the session_start() call consistently takes about 30 seconds to run. If I create a file that just has a session_start call in it and nothing else, it takes about thirty seconds.

I've tried a bunch of different things, and can't figure out what the problem is. I've created a file that grabs the session cookie, opens the session file (fopen), reads it, writes to it, and closes it, and that file runs in less than 1/10 of a second. It doesn't seem to be a file locking issue.

I've searched for a solution, and so far I haven't found one. The common work-around is to write a user session management system, which I would do if I could, but with the load balanced environment, I kind of need to keep the current system in place.

Any suggestions would be appreciated. I've run out of my own options to try.

Thanks.

  -- Rob

--- End Message ---

Reply via email to