php-general Digest 6 Jun 2004 16:33:05 -0000 Issue 2806

Topics (messages 187722 through 187737):

Re: Difficult SQL (for me) - please help!
        187722 by: John W. Holmes
        187731 by: Brian Dunning

Re: Best way to sort?
        187723 by: Burhan Khalid

Re: Multiple URL Redirection
        187724 by: Marek Kilimajer

Re: Session Garbage Collection (session.gc_maxlifetime)
        187725 by: Marek Kilimajer

Re: "lasso" (a bit 0T)
        187726 by: Roddie Grant

asp.net vs. php
        187727 by: Kathleen Ballard
        187732 by: Curt Zirzow
        187733 by: Aidan Lister
        187734 by: chris
        187735 by: raditha dissanayake
        187736 by: chris

Re: generating graphs
        187728 by: Nitin

[OT?] Apache/PHP error/warning(s)
        187729 by: PHP LIsts
        187730 by: Thomas Seifert

religius war: was:Re: [PHP] asp.net vs. php
        187737 by: raditha dissanayake

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 ---
Brian Dunning wrote:

Thanks to all who helped with my earlier SQL question. It was exactly what I needed. But now I'm making it more involved. Tom and Dick are competing salesmen. The data looks like this:

  Tom   Pitch
  Dick  Pitch
  Tom   Sale
  Dick  Sale
  Tom   Pitch

I want to show a list of salesmen, sorted by rate of sales:

  Dick   1 sale in 2 tries, 50.0%
  Tom    1 sale in 3 tries, 33.3%

Is this possible with a single SQL statement? Many thanks,

SELECT name, SUM(IF(result='Pitch',1,0)) as Tot_Pitches, SUM(IF(result='Sale',1,0)) as Tot_Sales, COUNT(result) AS cnt FROM yourtable GROUP BY name


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- THANKS!! :) :)
--- End Message ---
--- Begin Message --- Brian Dunning wrote:
I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data:

  Tom
  Greg
  Brian
  Tom
  Brian
  Tom

And return the following results, sorted by number of records:

  Tom - 3
  Brian - 2
  Greg - 1

Any thoughts?

I'm not a SQL expert, but try :

select field, count(field) from TableName
group by field
having count(*) > 1

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
Hi I have the following situation:

I've got a domain that is hosted at a certain host. This host allows me
to create subdomains, and also to add several domains to the same account.
The thing is if I add a domain like xxx.com to my yyy.com both will be directed
to my index.php page. I want to know if there is a way to recognize if the
user typed to the url xxx.om or yyy.com and then send it to a certain folder.
I thank any word of wisdom from you guys.
Rodrigo


You can also use mod_rewrite

Untested:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?yyy\.com
RewriteRule ^(.*)$ /yyy/$1
RewriteCond %{HTTP_HOST} ^(www\.)?xxx\.com
RewriteRule ^(.*)$ /xxx/$1

--- End Message ---
--- Begin Message --- coopster wrote:
Do I need to change the session.save_path directive for each virtual host to use their own directory other than the system and/or PHP default (/tmp) in order to effectively override each virtual host session.gc_maxlifetime directive?

Yes. But I did not read bellow ;-)


Let me offer an example for clarification.


--- End Message ---
--- Begin Message ---
on 30/5/04 6:59 pm, Ryan A at [EMAIL PROTECTED] wrote:

> Hey,
> A prospective client has asked me to try to convert his Swedish site so that
> visitors have a choice between Swedish and English, which is not a problem
> as I am fluent in both languages. After going through the site to convert I
> was just checking out the current pages and I saw that all the links have a
> .lasso extension instead of the "normal" .htm,.html,.php etc
> 
> Did a quick search on google and found this
> http://store.blueworld.com/lp7.lasso
> 
> sure looks like the same stuff but am not sure...
> 
> Anybody here worked with Lasso? any suggestions or comments?
> 
> Thanks,
> -Ryan


Hi Ryan

Lasso is a flourishing middleware program that does much the same job as
PHP. Its downside is that it is proprietry (owned by Blue World) so you have
to pay for it, and ISP charges are higher. The upside is that it is
generally (everyone - please don't start a war over this!) quicker to
develop in Lasso than PHP. It is more tag based than PHP, so probably less
intimidating to HTML programmers than PHP is. For example if constructions
look like this:
> if:(condition);
>   code here;
> /if;
You must close with the /if; but you don't get tied up in lots of {} pairs.

It is also generally (no war please!) much more secure than PHP. Or rather
the security is built in, and access can be set even on a tag by tag basis.
(I'm a PHP novice, so can't fully compare the two).

Its roots are in FileMaker, and it is still likely to be the best way to get
a Filemaker database on-line, but don't let that fool you. Since Mac OSX
came along, Lasso comes with an integrated version of MySQL and can connect
to stand-alone installations of MySQL directly (and other databases
indirectly I believe). It's very powerful and has  OO capabilities.

That's enough about Lasso on a PHP list. If you want to know more, by all
means email me off list, or join LassoTalk (email to
[EMAIL PROTECTED]).

Roddie Grant
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I have been asked to make a fact based comparison of
the pros and cons of asp.net and php.  I am not trying
to start a war and apologize if this is too off topic,
but I know make of the list members work in other
coding languages.

Three areas of concern are robustness, scalability and
development time.  Also important is the availability
of existing code (goes to development time).  I have
experience in asp and php, but have only read about
.net.  One big difference seems to be that .net is
event driven vs. php which is increasingly oo.

I am a bit concerned that I will be too biased in my
judgement, because if immediate development time is
considered, I will have to pass and lose a potentially
good client.  I am sure I can get up to speed quickly
in .net, but not quickly enough to answer immediate
needs.

Any experiences, links to online articles and
discussions would be welcome.

Kathleen

--- End Message ---
--- Begin Message ---
* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> I have been asked to make a fact based comparison of
> the pros and cons of asp.net and php.  I am not trying
> to start a war and apologize if this is too off topic,
> but I know make of the list members work in other
> coding languages.

Here is a 191 documents related to php vs. asp:

http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general

GGIYF


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
Hehe Curt, point made :)

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> > I have been asked to make a fact based comparison of
> > the pros and cons of asp.net and php.  I am not trying
> > to start a war and apologize if this is too off topic,
> > but I know make of the list members work in other
> > coding languages.
>
> Here is a 191 documents related to php vs. asp:
>
> http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general
>
> GGIYF
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
Curt, I know  you're well meaning, but ASP.old has nothing to do with
ASP.NET, so much of what  you provided is irrelevant. I just finished a
largish .NET project and will follow with a response to Kathleen's question.

-chris

-----Original Message-----
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 06, 2004 7:51 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] asp.net vs. php


* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
> I have been asked to make a fact based comparison of
> the pros and cons of asp.net and php.  I am not trying
> to start a war and apologize if this is too off topic,
> but I know make of the list members work in other
> coding languages.

Here is a 191 documents related to php vs. asp:

http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general

GGIYF


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

--- End Message ---
--- Begin Message ---
chris wrote:

Curt, I know  you're well meaning, but ASP.old has nothing to do with
ASP.NET, so much of what  you provided is irrelevant.

Curt's point is very valid none the less. just replace asp with asp.net when searching.


* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):


I have been asked to make a fact based comparison of
the pros and cons of asp.net and php. I am not trying
to start a war and apologize if this is too off topic,
but I know make of the list members work in other
coding languages.



Here is a 191 documents related to php vs. asp:

http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general





--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

--- End Message ---
--- Begin Message ---
and you'll find that there is not a comprehensive comparison. Don't be so
quick to assume that someone hasn't done their homework. I've the spent the
past 6 months learning .NET and searching for comprehensive discussions of
how it compares to other web development approaches. I can assure you that
there are very few comprehensive ROI or technical comparisons being made. 

There are, however, plenty of .02 about m$ and open source.

-----Original Message-----
From: raditha dissanayake [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 06, 2004 9:12 AM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] asp.net vs. php


chris wrote:

>Curt, I know  you're well meaning, but ASP.old has nothing to do with 
>ASP.NET, so much of what  you provided is irrelevant.
>
Curt's point is very valid none the less.  just replace asp with asp.net 
when searching.

>
>* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]):
>  
>
>>I have been asked to make a fact based comparison of
>>the pros and cons of asp.net and php.  I am not trying
>>to start a war and apologize if this is too off topic,
>>but I know make of the list members work in other
>>coding languages.
>>    
>>
>
>Here is a 191 documents related to php vs. asp:
>
>http://groups.google.com/groups?q=asp+vs+php&meta=group%3Dphp.general
>
>  
>


-- 
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

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

--- End Message ---
--- Begin Message ---
At last I've decided to upgrade it.
Could you please tell me, which version is best candidate yet to upgrade to?
And the procedure to upgrade with tar..

Thanks in advance


"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 5 Jun 2004 19:31:34 +0530 [EMAIL PROTECTED] (Nitin) wrote:
>
> > thanks for the help, but my PHP ver is 4.0.6...
> > Any other suggestions??
> >
>
> hmm, upgrade? :)
>
> really, its worth it!
>
>
> thomas
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi list

I can understand the difference between 'world writable' and 'writable
by the webserver' in concept, but how would I go about manipulating
these variables?

Specifically, theses are error reports generated when setting up
eGroupware (sourceforge.net)

Thanks in advance.

Stuart

--- End Message ---
--- Begin Message --- Php Lists wrote:
Hi list

I can understand the difference between 'world writable' and 'writable
by the webserver' in concept, but how would I go about manipulating
these variables?

Specifically, theses are error reports generated when setting up
eGroupware (sourceforge.net)

Thanks in advance.

Stuart

'man chmod' should help you.

--- End Message ---
--- Begin Message ---
chris wrote:

and you'll find that there is not a comprehensive comparison. Don't be so
quick to assume that someone hasn't done their homework. I've the spent the
past 6 months learning .NET and searching for comprehensive discussions of
how it compares to other web development approaches. I can assure you that
there are very few comprehensive ROI or technical comparisons being made.


You have in turn assumed that i am not familiar with .net, my first encounter was more than 2 years ago.
In any case it's futile talking about aps.net vs php in this list for the obvious reason that 99% of the people on this list are PHP enthusiasts.


--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

--- End Message ---

Reply via email to