Re: [PHP] PHP and Flash

2002-09-18 Thread timo stamm

Or let Flash take over the active part.

You can retrieve data from PHP scripts in Flash and build 
dynamic menus, for example. Pretty much everything is possible.


Timo


Am Mittwoch den, 18. September 2002, um 06:11, schrieb Rasmus Lerdorf:
> php.net/ming
>
> On Wed, 18 Sep 2002, [EMAIL PROTECTED] wrote:
>
>> Hi all,
>>
>> I've never combined PHP with Flash, but I do know there's some
>> possibilities. I'm wondering if I can make a dynamic-PHP-site which
>> controls Flash. I need the administrator to be able to upload 
>> a new product
>> to a DB, and then be seen by the visitors in Flash... is this 
>> possible?
>>
>> I want to do something like www.rolex.com but don't want to 
>> make new pages
>> every time a new product is added... Is this possble? Where 
>> can I find the
>> documentation?
>>
>> Thanks in advance,
>>
>> César Aracena
>> On Dial-Up
>>
>> 
>> mail2web - Check your email from the web at
>> http://mail2web.com/ .
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Fw: [PHP] Re:[PHP]question

2002-09-11 Thread timo stamm

Hi Meltem,


the second one was a better description of your problem.
Attached is the most convenient approach can come up with for 
this problem. It is not optimized, but should be easy to 
understand.


Timo



 
'.$f_a_err.'
 
'.$f_b_err.'
 
'.$f_c_err.'


');
};

if(@$fields_complete) {
echo ("all fields filled");
};

?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] dropdown Newbie question

2002-09-10 Thread timo stamm

Hi Mario,


you can set error_reporting to E_ALL to give you more hints to 
bugs and to produce clean code.

You are having two problems. The first was related to your form 
and has been addressed by Yasin.

The second is that you have autoglobals off. That means you have 
to use $_SERVER['PHP_SELF']. BTW: You could have found this 
error by reading about predefined variables, PHP_SELF in the 
manual.


Timo


Working:



  
   Background Color
   Blue
   Red
   Green
   Black
  

   


';

if(isset($_POST['color'])) {echo $_POST['color'];}

?>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Server date and time

2002-09-10 Thread timo stamm

Hi Christian,


Assuming that you use MySQL: Read up "6.2.2.2 The DATETIME, 
DATE, and TIMESTAMP Types" in the MySQL manual.
Hint: Add a column to hold the timestamps.


Timo


Am Dienstag den, 10. September 2002, um 18:08, schrieb Christian Ista:
> When a use insert the row in a table, I'd like to know the date 
> and time
> of this insertion. Is there a function to know the server date 
> and time,
> not the local time user ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] dropdown Newbie question

2002-09-10 Thread timo stamm

Hi Mario,


you can set error_reporting to E_ALL to give you more hints to 
bugs and to produce clean code.

You are having two problems. The first was related to your form 
and has been addressed by Yasin.

The second is that you have autoglobals off. That means you have 
to use $_SERVER['PHP_SELF']. BTW: You could have found this 
error by reading about predefined variables, PHP_SELF in the 
manual.


Timo


Working:



  
   Background Color
   Blue
   Red
   Green
   Black
  

   


';

if(isset($_POST['color'])) {echo $_POST['color'];}

?>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Compiling as BOTH DSO and CGI under apache.

2002-09-10 Thread timo stamm

Hi Dan,


I am not able to answer your question directly, but maybe you 
could simply use the CLI command 'chown' to change the owner of 
the files?


Timo


Am Dienstag den, 10. September 2002, um 03:35, schrieb [EMAIL PROTECTED]:
> I need to build php as a CGI for some scripts that need to run 
> as the user
> (image gallery scripts, where safe mode isn't enough to write to user
> directories, I need the files written AS a user, and chmodding the
> directory 6777 is just nuts.).


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Problems with filesize() and large files

2002-09-09 Thread timo stamm

Hi Kurt,


not pretty, but what about using the CLI tool ls with an exec() call?


Timo


Am Dienstag den, 10. September 2002, um 00:07, schrieb Kurt Glazemakers:

>
> Hi,
>
> I need the filesize in PHP for very large files, over 2 Gigabyte. The
> problem is that the integer returns the size in byte as an integer. If
> the integer is too big, it returns an negative value.
>
> Is it possible to extend the integer to 64 bit ? Or any other solution,
> to solve this problem ?
>
> Example:
>
> C:\php423\php>php -q c:\devel\filesize.php
> int(-834864026)
>
> Which checks the size of a 3 Gigabyte file.
>
> Many thanks,
>
> Kurt
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Upload Progress

2002-09-09 Thread timo stamm

Regarding the idea of using a socket connection with Flash:

It's not possible. You neither have file access with Flash (at 
least not from the browser plugin), nor access to a low level of 
the data to send it packet-wise.


It would be nice if the POST method did handle more details 
(total file size). But  then we would still have to wait for PHP 
and the whole bunch of browsers to support it. (Maybe there 
already is a related RFC?)


Timo


Am Montag den, 9. September 2002, um 20:20, schrieb David Buerer:

> Ya' know guys i'm sitting here thinking about this problem 
> because I have
> the same problem on one of my sites.  A bunch of inpatient 
> stupid users whom
> are click happy when they get impatient. Event a 100K upload 
> can take to
> long!
>
> I don't like the ASP idea.  It's really not a good solution.  
> I'm almost
> wondering if a JAVA solution which can do FTP directly or maybe 
> a direct
> socket connection/transfer with Macromedia Flash would work. 
> Both of these
> ways you could better monitor what's going on at the packet level and
> therefore giving a lot of control over something like a 
> progress bar.  Who
> knows.  It's got to be something other than PHP though because 
> PHP is after
> all only a server side language.
>
> -Original Message-
> From: Jed Verity [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 11:08 AM
> To: Jay Blanchard; [EMAIL PROTECTED]
> Subject: Re: [PHP] Upload Progress
>
>
> You're right about it costing more money. But we had one server 
> handling a
> bunch of uploads, most of them over 25 MB, and 99% being 
> instigated by very
> impatient, not very technical, people. People who kept canceling and
> canceling, despite our directions, because they thought it was stuck or
> frozen or taking too long. It was worth $150 for us to buy the 
> ASP component
> (I think we used ABCUpload, maybe?). The development time 
> required for a
> creative PHP solution -- and one that might not have worked as 
> well -- would
> have been dramatically more expensive than the almost out-of-the-box
> solution with ASP's components. (And much of the site was 
> already written in
> ASP.)
>
> Other than that, you'll get know argument from me about ASP vs. 
> PHP. I'm
> head over heels for PHP and, in any context other than the one 
> stated above
> (and maybe one or two others), I would choose to use God 
> Blessed PHP over
> anything else.
>
> Cheers!
> Jed
>
> P.S. I knew I'd get some fighters with that comment. Haven't learned my
> lesson yet... ;-)
>
> On the threshold of genius, Jay Blanchard wrote:
>
>> [snip]
>> There really isn't a great solution for this, that I know of. 
>> It's one of
>> the few things that makes an argument for ASP over PHP, as far as I'm
>> concerned (if you have the luxury of choosing). Below is what 
>> I did once
> to
>> try to get around the problem. It worked *okay*.
>> [/snip]
>>
>> How does this argue for ASP over PHP? I don't see how. File 
>> upload on PHP
> is
>> built in and therefore free. ASP file upload mechs cost more 
>> money. And,
>> having used ASP for a while, and having looked for this 
>> feature, no upload
>> progress bar exists there either. And PHP is a language, where 
>> ASP is a
>> service ... please do not confuse the two. If you want to 
>> argue VBScript
> vs.
>> PHP , well ,come on ... let's go. :^] PHP can beat VBScript with one
>> curly-brace tied behind its back.
>>
>> I mentioned a while back, when this came up before (see the 
>> archives) that
>> this could probably be done with an IFRAME in the upload 
>> dialog box. Now I
>> haven't given this much thought, but maybe it could be done. 
>> The largest
>> problem that I see is the communication back and forth between 
>> client and
>> server. The server would have to know the original size of the 
>> file at the
>> point the upload is started, then it would be checked for 
>> original_size
>> minus bits_uploaded, flush the reults to the IFRAME drawing a 
>> GD graph,
> and
>> continue to do this as it went on.
>>
>> Another method is to start the upload with a non-progressive animation
> that
>> quits when is_upload_file() returns true.
>>
>> Jay
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Upload Progress

2002-09-09 Thread timo stamm

Regarding the idea of using a socket connection with Flash:

It's not possible. You neither have file access with Flash (at 
least not from the browser plugin), nor access to a low level of 
the data to send it packet-wise.


It would be nice if the POST method did handle more details 
(total file size). But  then we would still have to wait for PHP 
and the whole bunch of browsers to support it. (Maybe there 
already is a related RFC?)


Timo


Am Montag den, 9. September 2002, um 20:20, schrieb David Buerer:

> Ya' know guys i'm sitting here thinking about this problem 
> because I have
> the same problem on one of my sites.  A bunch of inpatient 
> stupid users whom
> are click happy when they get impatient. Event a 100K upload 
> can take to
> long!
>
> I don't like the ASP idea.  It's really not a good solution.  
> I'm almost
> wondering if a JAVA solution which can do FTP directly or maybe 
> a direct
> socket connection/transfer with Macromedia Flash would work. 
> Both of these
> ways you could better monitor what's going on at the packet level and
> therefore giving a lot of control over something like a 
> progress bar.  Who
> knows.  It's got to be something other than PHP though because 
> PHP is after
> all only a server side language.
>
> -Original Message-
> From: Jed Verity [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 11:08 AM
> To: Jay Blanchard; [EMAIL PROTECTED]
> Subject: Re: [PHP] Upload Progress
>
>
> You're right about it costing more money. But we had one server 
> handling a
> bunch of uploads, most of them over 25 MB, and 99% being 
> instigated by very
> impatient, not very technical, people. People who kept canceling and
> canceling, despite our directions, because they thought it was stuck or
> frozen or taking too long. It was worth $150 for us to buy the 
> ASP component
> (I think we used ABCUpload, maybe?). The development time 
> required for a
> creative PHP solution -- and one that might not have worked as 
> well -- would
> have been dramatically more expensive than the almost out-of-the-box
> solution with ASP's components. (And much of the site was 
> already written in
> ASP.)
>
> Other than that, you'll get know argument from me about ASP vs. 
> PHP. I'm
> head over heels for PHP and, in any context other than the one 
> stated above
> (and maybe one or two others), I would choose to use God 
> Blessed PHP over
> anything else.
>
> Cheers!
> Jed
>
> P.S. I knew I'd get some fighters with that comment. Haven't learned my
> lesson yet... ;-)
>
> On the threshold of genius, Jay Blanchard wrote:
>
>> [snip]
>> There really isn't a great solution for this, that I know of. 
>> It's one of
>> the few things that makes an argument for ASP over PHP, as far as I'm
>> concerned (if you have the luxury of choosing). Below is what 
>> I did once
> to
>> try to get around the problem. It worked *okay*.
>> [/snip]
>>
>> How does this argue for ASP over PHP? I don't see how. File 
>> upload on PHP
> is
>> built in and therefore free. ASP file upload mechs cost more 
>> money. And,
>> having used ASP for a while, and having looked for this 
>> feature, no upload
>> progress bar exists there either. And PHP is a language, where 
>> ASP is a
>> service ... please do not confuse the two. If you want to 
>> argue VBScript
> vs.
>> PHP , well ,come on ... let's go. :^] PHP can beat VBScript with one
>> curly-brace tied behind its back.
>>
>> I mentioned a while back, when this came up before (see the 
>> archives) that
>> this could probably be done with an IFRAME in the upload 
>> dialog box. Now I
>> haven't given this much thought, but maybe it could be done. 
>> The largest
>> problem that I see is the communication back and forth between 
>> client and
>> server. The server would have to know the original size of the 
>> file at the
>> point the upload is started, then it would be checked for 
>> original_size
>> minus bits_uploaded, flush the reults to the IFRAME drawing a 
>> GD graph,
> and
>> continue to do this as it went on.
>>
>> Another method is to start the upload with a non-progressive animation
> that
>> quits when is_upload_file() returns true.
>>
>> Jay
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Calculating Totals from table columns without a second query to the DB

2002-09-09 Thread timo stamm

Hi Jay,


you suggestion does not make any difference.


The problem is that @idsum seems to be destroyed for every row!

Is there any other access method on a query that works properly 
or do I have to live with different results of the very same 
query asked directly in MySQL and asked through PHP?


Timo


Am Montag den, 9. September 2002, um 15:04, schrieb Jay Blanchard:

> [snip]
> I would like to be able to sum up a collumns values already in
> MySQL. The following query will sum up all values of the column
> 'id':
> SELECT @idsum:=(IFNULL(@idsum, id)+id), id FROM yourtable;
>
> Now a question to the PHP/MySQL experienced: Why does this type
> of query not work in combination with PHP? I am using query
> above as $query and do the following standard procedure:
> [/snip]
>
> Good point! Now as to your question, try this...
>
> SELECT @idsum:=(IFNULL(@idsum, id)+id) AS idsum, id FROM yourtable;
>
> When you output your query info output the value as $row->idsum;
>
> HTH!
>
> Jay
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Web Client - How to open applications by their own.

2002-09-09 Thread timo stamm

Hi Okar,


the client decides what to do with incoming data in regard of 
the MIME type.

Usually, there is a list of MIME type and corresponding action 
in the clients browser, and you can't change it from the server.


Timo



> Regardless the nature of the attachment, things are happening 
> expectedly (as
> far as I tested) as long as the SAVE button of the browser's save-file
> dialog is clicked.
> The OPEN button works fine as well, for browser compatible 
> files such as
> .jpeg, .gif, .txt, etc...
> But when it's matter of opening per ex. a MSPoverPoint *.pps 
> slide-show file
> as attachment through the browser's save-file dialog (well, the 
> button is
> there and any user may click it) the smooth running web client 
> turns into a
> PoverPoint application opened through the browser's window with 
> an empty
> project in design view.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Source files

2002-09-09 Thread timo stamm

Hi Adam,

Am Montag den, 9. September 2002, um 18:45, schrieb Adam Voigt:
> The code in the braces will never be executed
> because $a will always be ateast $b if not greater
> (assuming $c has a value) which means that it couldn't
> be greater, however it could be >= if $c was 0.

$c could also have a negative value :-)


Hi orange boy,

I think there is a mailing list for PHP developers (i.e. 
developers _of_ PHP) on PHP.net. But I am not sure if you will 
get the answer you want.


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to program very basic chat on PHP?

2002-09-09 Thread timo stamm

Hi Mig,


you have to look for the XMLSocket (data will be transported in 
XML documents). It is available since Flash 5.

But building a socket deamon on the server appears to be not 
that easy. The easiest way should be to use Pearl if you are 
unfamiliar with C.


Timo

> timo stamm wrote:
>
>> Hi Mig,
>>
>> to create something that behaves more like a true "chat", you
>> need an active client side.
>> For example, you could let a frame with the PHP be reloaded in a
>> short interval.
>>
>> To create a real chat, you need a socket connection. The best
>> solution would be Flash (which has great functions for that).
>> Java is another option.
>>
>> Timo
>
> Hello Timo, thanks very much. I don't know flash, but do you 
> think Flash
> 5 has this option also?. I read a basic Flash manual and didn't find
> some feature for 'sockets' or something else.
> For Java, I know a very basic programming of it, I will try study more
> of it to understand socket functions.
>
> Thanks all of you for your responses.
>
> Mig
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to program very basic chat on PHP?

2002-09-08 Thread timo stamm

Hi Mig,


to create something that behaves more like a true "chat", you 
need an active client side.
For example, you could let a frame with the PHP be reloaded in a 
short interval.

To create a real chat, you need a socket connection. The best 
solution would be Flash (which has great functions for that). 
Java is another option.


Timo


Am Sonntag den, 8. September 2002, um 12:05, schrieb M:

> "Philip J. Newman" wrote:
>
>> You could create a scema, or module that is called with each 
>> page load, that
>> checks for messages when the user is logged in.  So when the 
>> message is
>> stored into the databace, when the user loads the anypage 
>> while logged in it
>> checks for new messages, and if the user has messages then the 
>> window pops
>> up and the user can eather reply etc etc
>>
>> Phil
>
> Hello Phil, your idea is interesting. I am evaluating it 
> because it is not a
> true 'chat' (if user doesnt load any page he will never see 
> incoming msg), but
> your idea is the only thing I have to this time.
>
> Thanks
>
> Mig


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] contact list re-ordering (php/mySQL CMS design)

2002-09-08 Thread timo stamm

Hi speedfreak,


uh, clients. Can't they just send the checks an be content? :-)

I have yet not done a user-sorted list in PHP/MySQL (I am using 
PHP since a week, now :-). But I think the following database 
setup should allow you to do it:

id  content above   below
1   lalastart   2
2   blah1   3
3   sdfg2   5
5   oll 3   end

By referencing to the entry displayed above/below, you can quite 
easily write functions for getting the list and for moving rows.


Timo


Am Samstag den, 7. September 2002, um 18:08, schrieb 
[EMAIL PROTECTED]:

> Dear guru's,
>
> Hit a problem while developing a CMS with php/mySQL. Part of this is a
> contact list and this works ok (add/edit/delete with
> insert/update/delete queries). Now the client has requested a new
> feature: ability to change the order in which the contacts are being
> presented in the public part of this CMS (don't ask me why). I've added
> a field 'show_pos' to the contacts table and am able to change 
> its value
> when I edit an existing record or add a new one. What I can't wrap my
> head around at the moment is how one deals with updating 'show_pos' for
> the OTHER records (while editing/deleting present record (WHERE
> id='$id')? Could anyone give me some pointers as to how this could be
> done in php and/or SQL (preferable). I sure hope anyone 
> understands what
> I mean ...
>
> Cheers!
>
> newbie@a_loss
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] generating variable names

2002-09-08 Thread timo stamm

Hi Kevin,


I find it a bit awkward to mix variables and arrays in a pseudo 
array. But I guess you have reasons...

Anyhow, maybe this is what you want:


$variable1="one";
$variable2="two";
$variable3 = array();
$variable3[0]="three";
$variable4 = array();
$variable4[0]="four";

$j=1;
while($j<5){
if (is_array(${"variable".$j})) {
print(${"variable".$j}[0] . "");
} else {
print(${"variable".$j} . "");
};
$j++;
}


Timo


Am Freitag den, 6. September 2002, um 20:37, schrieb Kevin Heflin:

> Hoping someone can help me with this. Below I have an example 
> of what I'm trying to accomplish.
> Bottom line.. I need to print out $variable3[0] and $variable4[0]
> and my problem is that I'm trying to generate the variable 
> name. I can get this to work with $variable1 and $variable2 
> which are not arrays, however that doesn't help me much.
>
> Any suggestions would be appreciated.
>
> Kevin
>
>
>
>$variable1="one";
>   $variable2="two";
>   $variable3[0]="three";
>   $variable4[0]="four";
>   
>   $j=1;
>   while($j<5){
>   print("${variable.$j} ");
>   $j++;
>   }
>
>
>   $j=1;
>   while($j<5){
>   $k="\$variable".$j."[0]";
>   print("$k ");
>   print("${variable.$k} ");
>   $j++;
>   }
> ?>
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Calculating Totals from table columns without a second query to the DB

2002-09-07 Thread timo stamm

Hi Jay,


MySQL deserves some more respect. It's language is quite potent. 
Have you had a look on COUNT()? It is suited well for... well, 
counting.

I would like to be able to sum up a collumns values already in 
MySQL. The following query will sum up all values of the column 
'id':
SELECT @idsum:=(IFNULL(@idsum, id)+id), id FROM yourtable;

Now a question to the PHP/MySQL experienced: Why does this type 
of query not work in combination with PHP? I am using query 
above as $query and do the following standard procedure:

$result = mysql_query($query);
while ($row = mysql_fetch_row($result)) {
echo join(", ", $row) . "";
};

But MySQLs variable seems to be reset for each row. Is there any 
other access method on a query that can cope with it properly?


Timo


Am Freitag den, 6. September 2002, um 17:32, schrieb Jay Blanchard:

> [thinking out loud]
> For small result sets where I am looking for column totals I 
> generally issue
> 2 queries to the database, one for the data and one for the totals.
> This
> works fine, but for some things the database returns 100's or 1000's of
> records. To make this easier to use I "page" the records, showing an
> appropriate number of records for each page. The records for each page
> returned like so (normal);
>
> while($row = mysql_fetch_object($result)){
>print("" . $row->value . "\n");
>print("" . $row->another_value . "\n");
>}
>
> The PHB would now like a "totals per page" and a "grand 
> totals". Easy enough
> with 3 queries each time the page is called, one for the 
> records, one for
> the page totals, (using proper LIMIT queries) and one for the 
> grand totals,
> but awfully inefficient and intensive.
>
> I suppose I could do something like this;
>
> while($row = mysql_fetch_object($result)){
>print("" . $row->value . "\n");
>print("" . $row->another_value . "\n");
>$value1 = $value1 + $row->value;
>$value2 = $value2 + $row->another_value;
>}
> [/thinking out loud]
>
> In the process of typing this out I of course realized that 
> this would work
> very well. Even if the database contains NULL values they are 
> treated as
> zero. This gets me back to 2 queries, one of which only has to 
> be issued
> once (the one for the grand totals, the results can be held in 
> variables and
> echo'd or printed as needed). It also seems to be very efficient as the
> $value variables will only be doing a one time math operation each time
> through the while loop. For smaller results sets all on one 
> page the same
> type of operation could be used for the grand totals as well, 
> working the
> whole report down to a single query. I use a lot of crosstab 
> queries where
> totals are needed along the bottom or right side, you can only 
> do one within
> the original query. The other totals are left to another 
> query ... usually.
>
> This should be a lesson to us all, we all try to over-compicate 
> the issue
> sometimes. Usually a look at the
> docs/manual/FAQ/other-text-intensive-method-of-delivering-information 
> will
> deliver the solution to a problem while some thought slowed to 
> a reasonable
> speed (such as me typing out the problem above) will also allow natural
> logic to occur, producing a solution. Break down the process 
> into managable
> portions, solving each portion before moving on to the next.
>
> Challenge; Can this be made as simple for rows too?
>
> Peace and I HTH someone else!
>
> Jay
>
> Hard work has a future payoff. Laziness pays off NOW.
>
> *
> * Texas PHP Developers Conf  Spring 2003*
> * T Bar M Resort & Conference Center*
> * New Braunfels, Texas  *
> * Contact [EMAIL PROTECTED]   *
> *   *
> * Want to present a paper or workshop? Contact now! *
> *
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] gmdate()

2002-09-07 Thread timo stamm

Huh? I think date() will return different values, but gmdate() 
will not, since it returns GM time.


Lallous,

maybe it is something about summertime/wintertime?


Timo


Am Freitag den, 6. September 2002, um 16:36, schrieb Naintara Jain:

> lets say,
>
> ServerOne has TimeZone GMT+2
> ServerTwo has TimeZone GMT+3
>
> the gmdate() will return diff values for the same timestamp.
> essentially there will be a diff of 1 hour in the return values 
> from these
> two servers.
>
> -Naintara
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:php-general-
> [EMAIL PROTECTED]
> t]On Behalf Of lallous
> Sent: Friday, September 06, 2002 8:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] gmdate()
>
>
> I don't own the server, and the server is probably set up 
> correctly as it is
> a web hosting server.
>
> anyway, how should that RedHat 6 server be set up ?
>
> Elias
> "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> The server needs to be set up correctly - it needs to know what time
>> zone it is in and if the BIOS time is GMT or local.
>>
>> lallous wrote:
>>
>>> Isn't the gmdate() supposed to return the same value when run 
>>> from two
>>> different timezones?
>>>
>>>
>>> I run it on GMT+2 system and EDT system, and I get 1 hour difference,
>>>
>>> please advise.
>>>
>>> Elias
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Problem with inserting values into database through php

2002-09-07 Thread timo stamm

Hi Olli,


I think the query string is missing an ";"


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] multiple keywords in search boxes

2002-09-05 Thread timo stamm

Hi Jason,


have a look at Richard Lynchs reply posted at Sat, 31. Aug. 
2002  03:08:39 Europe/Berlin with subject "[PHP] Re: performing 
searches with random entries"


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help with inserting Flash into MySQL database

2002-09-05 Thread timo stamm

Hi Mitja,


If I understand this right, the SWF file has to be a SWF file.

To make it work like you want, you need a script that
- writes the SWF from the db to a SWF file on the server,
- returns HTML with object/embed tags and the path to the SWF file.


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] limit in a loop function to prevent server load

2002-09-04 Thread timo stamm

Hi Electroteque,


Am Dienstag den, 3. September 2002, um 10:14, schrieb Bas Jobsen:
>> hi there i was wondering if there was a way to limit the 
>> ammount of items
>> in a loop to execute sleep then execute the rest of the items 
>> to prevent
>> server load ?
>
> for($i=0;...)
> {
> if($i>0&&$i%100==0)sleep(10);
> }


I think

for($i=0; $i<100;$i++){
// do something
sleep(1);
};

makes more sense.


If that is already to much sleep:

$sleepinterval = 10;
$s = $sleepinterval;
for ($i=0; $i<100;$i++) {
// do something
if (!$s--) {sleep(1);$s = $sleepinterval;};
};

On every 10th (or whatever you define as $sleepinterval) 
iteration, the interpreter will sleep for a second.


But this still aint a sophisticated load balancing :-)


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] continuation to the ftp story

2002-09-04 Thread timo stamm

Hi Victor,


the error code (you are currently suppressing) should give you 
some directions.


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] sorting array question

2002-09-04 Thread timo stamm

Hi Javier,


I think parsing the listing into a multidemensional array is the 
answer. But actually, I do not yet know how that would look like 
in PHP. But I can give you an example of how it is done in 
ActionScript (Ecmascript).

file_arr[n] = [name, date]

Now you can sort file_arr by file_arr[n][0] (name) or 
file_arr[n][1] (date).


Hope it helps,
Timo


Am Dienstag den, 3. September 2002, um 12:27, schrieb Javier Montserat:

> i have the following code which reads a list of files from a 
> directory -
>
> $listcmd = "ls " .$dirPath;
> $temp = exec($listcmd, $listoffiles, $status);
> if($status == 0) {
> for ($i =0; $i < sizeof($listoffiles); $i++) {
>   $this->fileName[$i] = $listoffiles[$i];
>   $this->sizeofFile[$i] = sprintf("%01.2f", 
> (filesize($dirPath."/".$listoffiles[$i])/1024)/1024);
>   $this->fileDate[$i] = date("d-M-y H:i", 
> filemtime($dirPath."/".$listoffiles[$i]));
> }
> $this->displayFiles();
>
> What I want to do is display the files sorted by date.
>
> Okay, so I've just realised that the really easy way to do this 
> is by adding -St (sort by time) to the ls command...
>
> $listcmd = "ls -St " .$dirPath;
>
> But how could this be achieved by sorting the three arrays?  
> What if I alternately wanted to sort the files by name, size or 
> date without re-reading the directory each time?
>
> Would an associative array structure be better suited to this 
> type of operation?
>
> Thanks for your insight,
>
> Javier
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mysql string comparison not working

2002-09-03 Thread timo stamm

Hi David,


in PHP, you can not access associative arrays with index numbers 
(and your mysql row arrays will be of the associative kind).

But Chris posted a kludge recently:

//snip
Just for kicks ... here's something pretty ugly (I'd never use it), but
neat if you're interested (or somehow really have your heart set 
on using
integers).  There are probably a handful of other ways to do this:

$test = array ( 'a' => 'A', 'b' => 'B', 'c' => 'C');
$test_keys = array_keys( $test );
print $test[$test_keys[2]];  // Prints "C" - Same as print $test['c'];

~Chris
//snip


Timo


Am Dienstag den, 3. September 2002, um 08:33, schrieb David Banning:

> if I set test = "Y";
> then
>
> if ($test == "Y") {echo ("it matches");}
>
> seems to work while
>
> if ($row[24] == "Y") {echo ("it matches");}
>
> does not.
> The row[24] mysql variable is char type and 1 char long.
>
> any idea why it is not doing the comparison?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] RE : include interpreted php file

2002-09-03 Thread timo stamm

@all:

I just noticed that I was not replying to the list, but to the 
posting email adresses. I just switched to another email client 
and was not aware of this. My apologies :-(


---


You,

could it be that you want to do the following?:




Am Dienstag den, 3. September 2002, um 00:15, schrieb you:
> Thanks for ur help and i'm sorry to have a so bad english

I guess my french is worse than your english :-)


Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Safe_Mode problem....

2002-09-03 Thread timo stamm

Hi Jim,


I had the very same strange issue with a cfg var not changing. 
It worked after using ini_restore(). (I played around with 
ini_set() before. Did you as well?)

I am not sure if it has anything to do with it. It sounds pretty 
illogical. But PHP ignoring a setting in php.ini sounds 
illogical as well, so it might be worth a try.


Timo


> Jim Hatridge wrote:
>
>> Can someone give me an idea what next to do? Either how to 
>> turn off safe_mode or a work around on the code. BTW I'm using 
>> SuSE 8.0, PHP, and Mysql on a self-made PI/233.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: posting form values doesn't work

2002-09-03 Thread timo stamm

Hi Øystein,


PHP is interpreted on the server side, JS on the client side. I 
guess thats what you need to realize. Try starting with less 
complex stuff and just concentrate on one language at a time, in 
the beginning.


Timo


Am Montag den, 2. September 2002, um 17:49, schrieb Øystein 
Håland:
> So, why does it work some time mixing javascript and php, and not every
> time?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] empty php.ini

2002-09-02 Thread timo stamm

Hi,


I am new to PHP. I am running the module version 4.2.2 from Marc 
Lyanage (entropy.ch) on OS X 10.1 and noticed that my 
/usr/local/lib/php.ini is empty!?

Is there a way


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php