php-general Digest 24 Feb 2008 09:38:34 -0000 Issue 5311

2008-02-24 Thread php-general-digest-help

php-general Digest 24 Feb 2008 09:38:34 - Issue 5311

Topics (messages 269975 through 269987):

mysql_field_name
269975 by: Emiliano Boragina

Re: temporary error
269976 by: Andrés Robinet
269981 by: Robert Cummings
269984 by: Andrés Robinet

Re: validate + if
269977 by: Richard Lynch

Re: while
269978 by: Richard Lynch

Re: Session destruction problem
269979 by: Adil Drissi

Question about PHP Licence and it's future!
269980 by: Tamer Higazi
269982 by: Robert Cummings
269983 by: Andrés Robinet
269985 by: Andrés Robinet
269986 by: Andrés Robinet
269987 by: Robert Cummings

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]


--
---BeginMessage---
Hi list

 

I have the following code:

 

?

 $base = panel;

 $conexion = mysql_connect ( 'localhost' , 'root' , 'root' );

 mysql_select_db ( $base , $conexion );

 echo table border='1';

 $resultado = mysql_query (select * from registro , $conexion);

 while ( $registro = mysql_fetch_row ($resultado)) {

   echo tr;

   foreach ( $registro as $clave ) {

echo td . mysql_field_name($resultado, '') .
/td;

   }

   echo /tr;

   echo tr;

   foreach ( $registro as $clave ) {

echo td . $clave . /td;

   }

 }

 echo /tr/table;

?

 

But the result is two TR with only the first field name of the DB.

I want to see all fields name of the DB and only in one TR… how can I do
that (in code please)?

 

Thanks.

 

+  _
   // Emiliano Boragina _

   // Diseño  Comunicación //
+  _

   // [EMAIL PROTECTED]  /
   // 15 40 58 60 02 ///
+  _

 

---End Message---
---BeginMessage---
 -Original Message-
 From: Greg Donald [mailto:[EMAIL PROTECTED]
 Sent: Saturday, February 23, 2008 1:33 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: temporary error
 
 On 2/23/08, tedd [EMAIL PROTECTED] wrote:
  I love the book written by Carl Sagan the The Dragons of Eden -- he
   has an interesting perspective on the God thing and it contains more
   substance than a cute quote.
 
 Well as long as we're quoting famous old fence-sitting agnostics, lets
 not forget Sagan's best:
 
 'If by God one means the set of physical laws that govern the
 universe, then clearly there is such a God. This God is emotionally
 unsatisfying... it does not make much sense to pray to the law of
 gravity.'
 
 
 --
 Greg Donald
 http://destiney.com/

Why not? Many people believes in such a God, so he has a very high probability
of existence, and it has taken the worst part as nobody I know of is currently
praising and praying to him.
Maybe, it is about time to give some recognition to *the real God*:

I believe in Spinoza's God, who reveals Himself in the lawful harmony of the
world, not in a God Who concerns Himself with the fate and the doings of
mankind. - Albert Einstein

At least this God seems not to incite people to kill other people, and doesn't
ask you to go to church every Sunday to put some money in the priest's pockets.

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com
---End Message---
---BeginMessage---

On Sat, 2008-02-23 at 20:11 -0500, Andrés Robinet wrote:
  -Original Message-
  From: Greg Donald [mailto:[EMAIL PROTECTED]
  Sent: Saturday, February 23, 2008 1:33 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Re: temporary error
  
  On 2/23/08, tedd [EMAIL PROTECTED] wrote:
   I love the book written by Carl Sagan the The Dragons of Eden -- he
has an interesting perspective on the God thing and it contains more
substance than a cute quote.
  
  Well as long as we're quoting famous old fence-sitting agnostics, lets
  not forget Sagan's best:
  
  'If by God one means the set of physical laws that govern the
  universe, then clearly there is such a God. This God is emotionally
  unsatisfying... it does not make much sense to pray to the law of
  gravity.'
  
  
  --
  Greg Donald
  http://destiney.com/
 
 Why not? Many people believes in such a God, so he has a very high probability
 of existence, and it has 

php-general Digest 24 Feb 2008 22:00:56 -0000 Issue 5312

2008-02-24 Thread php-general-digest-help

php-general Digest 24 Feb 2008 22:00:56 - Issue 5312

Topics (messages 269988 through 270014):

Re: temporary error
269988 by: Robert Cummings
269989 by: tedd
269990 by: tedd
27 by: Zoltán Németh

Re: All Survey leading to PHP
269991 by: tedd

Re: mysql_field_name
269992 by: tedd

Re: Plant Extracts and Our Factory
269993 by: tedd
269997 by: Shawn McKenzie

Re: Question about PHP Licence and it's future!
269994 by: tedd

Re: System errno in PHP
269995 by: Michal Maras

Re: Session destruction problem
269996 by: Shawn McKenzie

Re: Shopping Carts
269998 by: Shawn McKenzie
26 by: Robert Cummings
270005 by: Bastien Koert

Re: temprorary error
270001 by: Mary Anderson
270002 by: Robert Cummings
270003 by: Zoltán Németh
270010 by: tedd
270013 by: Robert Cummings

PHPTriad and php error
270004 by: hE
270006 by: Bastien Koert
270007 by: hE
270009 by: Bastien Koert

mysql test and error
270008 by: hE
270011 by: Brady Mitchell
270012 by: Nathan Rixham
270014 by: hE

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]


--
---BeginMessage---
On Sun, 2008-02-24 at 03:34 -0500, Andrés Robinet wrote:
  -Original Message-
  From: Robert Cummings [mailto:[EMAIL PROTECTED]
  Sent: Sunday, February 24, 2008 2:34 AM
  To: Andrés Robinet
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] Re: temporary error
  
  
  On Sat, 2008-02-23 at 20:11 -0500, Andrés Robinet wrote:
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 23, 2008 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: temporary error
   
On 2/23/08, tedd [EMAIL PROTECTED] wrote:
 I love the book written by Carl Sagan the The Dragons of Eden -- he
  has an interesting perspective on the God thing and it contains more
  substance than a cute quote.
   
Well as long as we're quoting famous old fence-sitting agnostics, lets
not forget Sagan's best:
   
'If by God one means the set of physical laws that govern the
universe, then clearly there is such a God. This God is emotionally
unsatisfying... it does not make much sense to pray to the law of
gravity.'
   
   
--
Greg Donald
http://destiney.com/
  
   Why not? Many people believes in such a God, so he has a very high
  probability
   of existence, and it has taken the worst part as nobody I know of is
  currently
   praising and praying to him.
  
  You sir have homework:
  
  http://en.wikipedia.org/wiki/Bandwagon_effect
  http://en.wikipedia.org/wiki/List_of_cognitive_biases
  http://en.wikipedia.org/wiki/Critical_Thinking
  

 LOL, I have to recognize that my previous email had some dirty tricks in it. 
 I was mostly being ironic. I'm actually more of an agnostic person (with some 
 atheism moments from time to time). So, let me clarify what I said and to 
 whom I said it:
 
 *Many people believe in such a God, so he has a very high probability of 
 existence*:
 
 To those who say that something exists because they believe in it. That can't 
 be true, since anybody can argue the opposite (something does not exist, 
 because they don't believe in it) and neither of them can be proved.
 As both statements can't be true, we can assume there's no deterministic way 
 in which existence can be derived from belief. So we can propose as an 
 alternate hypothesis that existence is a probabilistic variable, proportional 
 to the number of believers, ergo, the aforementioned God has pretty good 
 chance of existence.
 Furthermore, in order to simplify the problem we can compute the probability 
 of existence, in a weighted average fashion, using the metric *believer 
 contribution to the human race* (from now on called C), we get following 
 formula:
 
 P(G) = SUM [ C(i)*X(i) ] / SUM [ C(i) ]
 
 Were, P(G) is the *probability of existence of god G*, C(i) is the 
 aforementioned metric applied to person *i* and X is a binary variable, such 
 that:
 
 X(i) = [*i* is a person: 1 if person *i* is a believer of god G, 0 otherwise]
 
 We can even find joint probabilities for gods G1 and G2 and calculate all 
 sorts of statistic parameters. The only problem is determining C(i), that is, 
 a measure of the contribution of person *i* to the human race, but our team 
 has found a method for that. I can't get deeper into this, because I would be 
 in violation the NDA I have signed with NSA.
 Interesting though, is that we can find gods that have more probability of 
 existence than an electron in the first level of energy of an hydrogen atom 
 (and we don't have 

RE: [PHP] Re: temporary error

2008-02-24 Thread Andrés Robinet
 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]
 Sent: Sunday, February 24, 2008 2:34 AM
 To: Andrés Robinet
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Re: temporary error
 
 
 On Sat, 2008-02-23 at 20:11 -0500, Andrés Robinet wrote:
   -Original Message-
   From: Greg Donald [mailto:[EMAIL PROTECTED]
   Sent: Saturday, February 23, 2008 1:33 PM
   To: php-general@lists.php.net
   Subject: Re: [PHP] Re: temporary error
  
   On 2/23/08, tedd [EMAIL PROTECTED] wrote:
I love the book written by Carl Sagan the The Dragons of Eden -- he
 has an interesting perspective on the God thing and it contains more
 substance than a cute quote.
  
   Well as long as we're quoting famous old fence-sitting agnostics, lets
   not forget Sagan's best:
  
   'If by God one means the set of physical laws that govern the
   universe, then clearly there is such a God. This God is emotionally
   unsatisfying... it does not make much sense to pray to the law of
   gravity.'
  
  
   --
   Greg Donald
   http://destiney.com/
 
  Why not? Many people believes in such a God, so he has a very high
 probability
  of existence, and it has taken the worst part as nobody I know of is
 currently
  praising and praying to him.
 
 You sir have homework:
 
 http://en.wikipedia.org/wiki/Bandwagon_effect
 http://en.wikipedia.org/wiki/List_of_cognitive_biases
 http://en.wikipedia.org/wiki/Critical_Thinking
 
 Cheers,
 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

LOL, I have to recognize that my previous email had some dirty tricks in it. I 
was mostly being ironic. I'm actually more of an agnostic person (with some 
atheism moments from time to time). So, let me clarify what I said and to whom 
I said it:

*Many people believe in such a God, so he has a very high probability of 
existence*:

To those who say that something exists because they believe in it. That can't 
be true, since anybody can argue the opposite (something does not exist, 
because they don't believe in it) and neither of them can be proved.
As both statements can't be true, we can assume there's no deterministic way in 
which existence can be derived from belief. So we can propose as an alternate 
hypothesis that existence is a probabilistic variable, proportional to the 
number of believers, ergo, the aforementioned God has pretty good chance of 
existence.
Furthermore, in order to simplify the problem we can compute the probability of 
existence, in a weighted average fashion, using the metric *believer 
contribution to the human race* (from now on called C), we get following 
formula:

P(G) = SUM [ C(i)*X(i) ] / SUM [ C(i) ]

Were, P(G) is the *probability of existence of god G*, C(i) is the 
aforementioned metric applied to person *i* and X is a binary variable, such 
that:

X(i) = [*i* is a person: 1 if person *i* is a believer of god G, 0 otherwise]

We can even find joint probabilities for gods G1 and G2 and calculate all sorts 
of statistic parameters. The only problem is determining C(i), that is, a 
measure of the contribution of person *i* to the human race, but our team has 
found a method for that. I can't get deeper into this, because I would be in 
violation the NDA I have signed with NSA.
Interesting though, is that we can find gods that have more probability of 
existence than an electron in the first level of energy of an hydrogen atom 
(and we don't have such a complicated formula! 
http://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation)
So this is more of a scientific reality (still being researched) than a bias in 
our brains. And we must believe in science, *EVERYONE DOES*, right? (lol)


*and it has taken the worst part as nobody I know of is currently praising and 
praying to him*

Just part of the (bogus) argument. I have not yet conducted a survey, but, why 
would you praise a God if he has no implications in your life (hey, perhaps 
that's how the *personal God* idea arose in human minds). And why would you 
pray to him, if he's not interested in your fate or life and has zero 
requirements to let you in his *private circle of trust*? (yes, I took that 
from *The Fuckers* movie).

So, there are scientific studies to support my argument (call 0800-THE-NSA and 
ask for Rob if you don't believe me). And at least a rational assumption also 
(*and it has taken the worst part as nobody...*).
What bias are you talking about?

Regards,

Rob

PS. Please 

RE: [PHP] Question about PHP Licence and it's future!

2008-02-24 Thread Andrés Robinet
 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]
 Sent: Sunday, February 24, 2008 2:40 AM
 To: Tamer Higazi
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Question about PHP Licence and it's future!
 
 
 On Sun, 2008-02-24 at 06:50 +0200, Tamer Higazi wrote:
  Hi!
  I have asked myself a question. After I saw, that SAP will no more
  release future Versions of their open source Database MaxDB under the
  GPL License, I have asked myself either if this could happen with PHP.
 
  Who owns PHP? Is it Zend Technologies or the PHP Group itself? Who is
  the PHP Group and what makes the PHP Group?
 
  Who guaranties that future Versions of PHP stays open source and are
  being released under the Terms of the General Public Licenses?
 
  Can future Versions from one day to the other no more being released
  under the GPL, only under a closed source license? Let us say, PHP would
  be distributed for several architectures only in binary forms and the
  PECL modules stay open source.
 
  These questions are for me very importand according to an commercial
  product which will be planed, designed, written and sold commercially.
 
  We are pendling between Ruby, Python and PHP5. Only the point written
  is unclear.
 
 It doesn't matter. The PHP code as it is has been released under the PHP
 License. This means if the future versions were ever released under
 another license that was exclusionary, then there is still the
 opportunity to fork code released under the PHP license. Heck you can
 fork the PHP project now if you felt you could get the ball rolling with
 enough momentum for acceptance. If beleive the hardened PHP project is
 considered a fork despite the fact it generally keeps full compatibility
 while adding security enhancements.
 
 Cheers,
 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

Rob,

Are you sure you can fork the *current* PHP version??? The hardened PHP project
still complains with the PHP license I think. I don't think the current PHP
version can be forked, you can fork PHP 3, but not PHP 5 for example. Maybe I'm
totally wrong, but it doesn't matter, I don't think PHP will change its license
in a substantial way, it wouldn't be profitable to anybody on the long run
(including Zend) and everyone would start switching to, say, RoR. Just my
uninformed and honest opinion.

Regards,

Rob (Other Rob that is actually called Andrés)


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-24 Thread Andrés Robinet
 -Original Message-
 From: Andrés Robinet [mailto:[EMAIL PROTECTED]
 Sent: Sunday, February 24, 2008 3:41 AM
 To: 'Robert Cummings'; 'Tamer Higazi'
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Question about PHP Licence and it's future!
 
  -Original Message-
  From: Robert Cummings [mailto:[EMAIL PROTECTED]
  Sent: Sunday, February 24, 2008 2:40 AM
  To: Tamer Higazi
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] Question about PHP Licence and it's future!
 
 
  On Sun, 2008-02-24 at 06:50 +0200, Tamer Higazi wrote:
   Hi!
   I have asked myself a question. After I saw, that SAP will no more
   release future Versions of their open source Database MaxDB under the
   GPL License, I have asked myself either if this could happen with PHP.
  
   Who owns PHP? Is it Zend Technologies or the PHP Group itself? Who is
   the PHP Group and what makes the PHP Group?
  
   Who guaranties that future Versions of PHP stays open source and are
   being released under the Terms of the General Public Licenses?
  
   Can future Versions from one day to the other no more being released
   under the GPL, only under a closed source license? Let us say, PHP
 would
   be distributed for several architectures only in binary forms and the
   PECL modules stay open source.
  
   These questions are for me very importand according to an commercial
   product which will be planed, designed, written and sold commercially.
  
   We are pendling between Ruby, Python and PHP5. Only the point written
   is unclear.
 
  It doesn't matter. The PHP code as it is has been released under the PHP
  License. This means if the future versions were ever released under
  another license that was exclusionary, then there is still the
  opportunity to fork code released under the PHP license. Heck you can
  fork the PHP project now if you felt you could get the ball rolling with
  enough momentum for acceptance. If beleive the hardened PHP project is
  considered a fork despite the fact it generally keeps full compatibility
  while adding security enhancements.
 
  Cheers,
  Rob.
  --
  ..
  | InterJinn Application Framework - http://www.interjinn.com |
  ::
  | An application and templating framework for PHP. Boasting  |
  | a powerful, scalable system for accessing system services  |
  | such as forms, properties, sessions, and caches. InterJinn |
  | also provides an extremely flexible architecture for   |
  | creating re-usable components quickly and easily.  |
  `'
 
 Rob,
 
 Are you sure you can fork the *current* PHP version??? The hardened PHP
 project
 still complains with the PHP license I think. I don't think the current PHP

I meant *complies* not *complains* sorry (lol, I really need that cup of coffee
now)

Regards,

Rob

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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-24 Thread Robert Cummings

On Sun, 2008-02-24 at 03:49 -0500, Andrés Robinet wrote:
  -Original Message-
  From: Andrés Robinet [mailto:[EMAIL PROTECTED]
  Sent: Sunday, February 24, 2008 3:41 AM
  To: 'Robert Cummings'; 'Tamer Higazi'
  Cc: php-general@lists.php.net
  Subject: RE: [PHP] Question about PHP Licence and it's future!
  
   -Original Message-
   From: Robert Cummings [mailto:[EMAIL PROTECTED]
   Sent: Sunday, February 24, 2008 2:40 AM
   To: Tamer Higazi
   Cc: php-general@lists.php.net
   Subject: Re: [PHP] Question about PHP Licence and it's future!
  
  
   On Sun, 2008-02-24 at 06:50 +0200, Tamer Higazi wrote:
Hi!
I have asked myself a question. After I saw, that SAP will no more
release future Versions of their open source Database MaxDB under the
GPL License, I have asked myself either if this could happen with PHP.
   
Who owns PHP? Is it Zend Technologies or the PHP Group itself? Who is
the PHP Group and what makes the PHP Group?
   
Who guaranties that future Versions of PHP stays open source and are
being released under the Terms of the General Public Licenses?
   
Can future Versions from one day to the other no more being released
under the GPL, only under a closed source license? Let us say, PHP
  would
be distributed for several architectures only in binary forms and the
PECL modules stay open source.
   
These questions are for me very importand according to an commercial
product which will be planed, designed, written and sold commercially.
   
We are pendling between Ruby, Python and PHP5. Only the point written
is unclear.
  
   It doesn't matter. The PHP code as it is has been released under the PHP
   License. This means if the future versions were ever released under
   another license that was exclusionary, then there is still the
   opportunity to fork code released under the PHP license. Heck you can
   fork the PHP project now if you felt you could get the ball rolling with
   enough momentum for acceptance. If beleive the hardened PHP project is
   considered a fork despite the fact it generally keeps full compatibility
   while adding security enhancements.
 
  Rob,
  
  Are you sure you can fork the *current* PHP version??? The hardened PHP
  project
  still complains with the PHP license I think. I don't think the current PHP
 
 I meant *complies* not *complains* sorry (lol, I really need that cup of 
 coffee
 now)

Yes you can fork it. The hardened PHP project complains that they're not
allowed to use PHP in the name hence they use Suhosin. They mostly
complain because they asked for permission and were denied and yet
looking around you see things like PHPBB and other stuff including PHP
in the name. The difference however is that PHPBB uses PHP as it's
language but does not actually modify or distribute the PHP source
itself.

Specifically permission to fork is granted by this phrase:

Redistribution and use in source and binary forms, with
 or without modification, is permitted provided that the
 following conditions are met:

And then there's a bunch of things you must adhere to which are fairly
run of the mill.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] Re: temporary error

2008-02-24 Thread Robert Cummings
On Sun, 2008-02-24 at 03:34 -0500, Andrés Robinet wrote:
  -Original Message-
  From: Robert Cummings [mailto:[EMAIL PROTECTED]
  Sent: Sunday, February 24, 2008 2:34 AM
  To: Andrés Robinet
  Cc: php-general@lists.php.net
  Subject: RE: [PHP] Re: temporary error
  
  
  On Sat, 2008-02-23 at 20:11 -0500, Andrés Robinet wrote:
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 23, 2008 1:33 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: temporary error
   
On 2/23/08, tedd [EMAIL PROTECTED] wrote:
 I love the book written by Carl Sagan the The Dragons of Eden -- he
  has an interesting perspective on the God thing and it contains more
  substance than a cute quote.
   
Well as long as we're quoting famous old fence-sitting agnostics, lets
not forget Sagan's best:
   
'If by God one means the set of physical laws that govern the
universe, then clearly there is such a God. This God is emotionally
unsatisfying... it does not make much sense to pray to the law of
gravity.'
   
   
--
Greg Donald
http://destiney.com/
  
   Why not? Many people believes in such a God, so he has a very high
  probability
   of existence, and it has taken the worst part as nobody I know of is
  currently
   praising and praying to him.
  
  You sir have homework:
  
  http://en.wikipedia.org/wiki/Bandwagon_effect
  http://en.wikipedia.org/wiki/List_of_cognitive_biases
  http://en.wikipedia.org/wiki/Critical_Thinking
  

 LOL, I have to recognize that my previous email had some dirty tricks in it. 
 I was mostly being ironic. I'm actually more of an agnostic person (with some 
 atheism moments from time to time). So, let me clarify what I said and to 
 whom I said it:
 
 *Many people believe in such a God, so he has a very high probability of 
 existence*:
 
 To those who say that something exists because they believe in it. That can't 
 be true, since anybody can argue the opposite (something does not exist, 
 because they don't believe in it) and neither of them can be proved.
 As both statements can't be true, we can assume there's no deterministic way 
 in which existence can be derived from belief. So we can propose as an 
 alternate hypothesis that existence is a probabilistic variable, proportional 
 to the number of believers, ergo, the aforementioned God has pretty good 
 chance of existence.
 Furthermore, in order to simplify the problem we can compute the probability 
 of existence, in a weighted average fashion, using the metric *believer 
 contribution to the human race* (from now on called C), we get following 
 formula:
 
 P(G) = SUM [ C(i)*X(i) ] / SUM [ C(i) ]
 
 Were, P(G) is the *probability of existence of god G*, C(i) is the 
 aforementioned metric applied to person *i* and X is a binary variable, such 
 that:
 
 X(i) = [*i* is a person: 1 if person *i* is a believer of god G, 0 otherwise]
 
 We can even find joint probabilities for gods G1 and G2 and calculate all 
 sorts of statistic parameters. The only problem is determining C(i), that is, 
 a measure of the contribution of person *i* to the human race, but our team 
 has found a method for that. I can't get deeper into this, because I would be 
 in violation the NDA I have signed with NSA.
 Interesting though, is that we can find gods that have more probability of 
 existence than an electron in the first level of energy of an hydrogen atom 
 (and we don't have such a complicated formula! 
 http://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation)
 So this is more of a scientific reality (still being researched) than a bias 
 in our brains. And we must believe in science, *EVERYONE DOES*, right? (lol)

This is still invalid argument. I'm not sure if it falls under illusory
correlation, proof by verbosity or both. It makes no difference what
the math says since we know nothing about the probability and we cannot
ascertain any probability from any sample. The probability that God
exists doesn't change depending on the audience, just like the
probability of a fair dice doesn't change depending on the thrower (note
I said fair dice ;). To declare some probability means we have some
knowledge of God, but if we did then the whole issue would be moot. And
so the probability is unknown. For instance, the question is not the
same as trying to guess the probability of aliens existing in the
universe. For the universe we know the approximate size, and we know
that there are already creatures living in the universe (us). And so we
can try to guess a probability based on this knowledge. But for God...
we know nothing.

 *and it has taken the worst part as nobody I know of is currently
 praising and praying to him*
 
 Just part of the (bogus) argument. I have not yet conducted a survey,
 but, why would you praise a God if he has no implications in your life
 (hey, perhaps that's how the *personal God* idea arose in human
 

Re: [PHP] Re: temporary error

2008-02-24 Thread tedd

At 12:12 PM -0600 2/23/08, Greg Donald wrote:

On 2/23/08, tedd [EMAIL PROTECTED] wrote:

  For us to criticize each other for our beliefs would serve no purpose
  other than to exhibit intolerance. And, I think we can all agree that
  intolerance should not be tolerated.


I believe it was Thomas Jefferson who said, Ridicule is the only
weapon which can be used against unintelligible propositions.


Greg:

While I like Thomas Jefferson, it doesn't mean that I agree with 
everything he said nor that he is right.


Besides, I don't think your proposition is unintelligible. :-)

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] All Survey leading to PHP

2008-02-24 Thread tedd

At 8:44 PM +0100 2/23/08, Per Jessen wrote:

tedd wrote:


 If a client hires me to do something, whatever code I write is his --
 that's simple enough.



Tedd - the world is not limited to PHP contractors.  Think about people
writing products that they sell.


Been there, done that for a long time -- decades in fact. I wrote a 
lot of Mac and Apple applications.


I finally arrived at a place where I realize that the time it takes 
to protect what you've done cost you more than it would if you just 
moved on to the next project.



Also, it's usually not the code that matter as such, it's the algorithm
or the method.


Expose the method and usually someone can duplicate and improve it.

So that goes to my first point -- why spend effort trying to stop 
someone who can't be stopped?


Now, that doesn't mean that you can't patent your idea -- and that's 
the best protection I know.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: temporary error

2008-02-24 Thread tedd

At 12:32 PM -0600 2/23/08, Greg Donald wrote:

On 2/23/08, tedd [EMAIL PROTECTED] wrote:

 I love the book written by Carl Sagan the The Dragons of Eden -- he
  has an interesting perspective on the God thing and it contains more
  substance than a cute quote.


Well as long as we're quoting famous old fence-sitting agnostics, lets
not forget Sagan's best:


I wasn't quoting -- I was providing reference.


'If by God one means the set of physical laws that govern the
universe, then clearly there is such a God. This God is emotionally
unsatisfying... it does not make much sense to pray to the law of
gravity.'


Seems an obvious statement.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Plant Extracts and Our Factory

2008-02-24 Thread tedd

At 4:02 AM +0800 2/24/08, [EMAIL PROTECTED] wrote:

Mr. Dong


I think that says it all.

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] Question about PHP Licence and it's future!

2008-02-24 Thread tedd

Rob (Other Rob that is actually called Andrés)


Yeah, that confused me too. Especially when I saw you arguing with yourself.

Also, the phrase:

Rob (Other Rob that is actually called Andrés)

would read better as:

Rob (Other Rob who is actually called Andrés)

Why don't you use the name Andrés ? That's much better than Rob anyway. ;-)

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] mysql_field_name

2008-02-24 Thread tedd

At 8:16 PM -0300 2/23/08, Emiliano Boragina wrote:

I want to see all fields name of the DB and only in one TR… how can I do
that (in code please)?


$result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__));
$columns = mysql_num_fields($result);
for($i = 0; $i = $columns; $i++)
{
echo(th mysql_field_name($result, $i)/th);
}

This works for me -- however, it could be improved.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] System errno in PHP

2008-02-24 Thread Michal Maras
Hi

 Thank you for answer, but I do not understand.
 How can I use this class Errno after unsuccessful fopen?
 I want to get the number, for example 13 if there is not enough permissions
to open file.
It is not problem for me that script will be no portable, it is
only for AIX.

By

On 22/02/2008, Ravi Menon [EMAIL PROTECTED] wrote:

 Hi,

 I also ran into the same issue with file and socket apis, and for now, I
 just
 hack it like ( for linux 2.6 systems ):

 class Errno
 {
 const EINTR=  4;
 const EIO  =  5;
 const EINVAL   =  22;
 const ENODATA  =  61;
 const EBADMSG  =  74;
 const EOPNOTSUPP   =  95;
 const ECONNRESET   =  104;
 const ENOTCONN =  107;
 const ETIMEDOUT=  110;
 const EALREADY =  114;
 const EINPROGRESS  =  115;

 // useful static methods that use posix_strerror()
 // and socket_strerror() to return strings for logging purposes...
 .
 .

 }

 Clearly this is not portable, but I am betting that usually on the
 same kernel releases, they
 don't usually change these numbers around.

 Having PHP expose these useful constants in a portable manner would be
 a big plus.

 Thanks,
 Ravi


 On Thu, Feb 21, 2008 at 9:04 AM, Richard Lynch [EMAIL PROTECTED] wrote:
  On Wed, February 20, 2008 2:56 am, Michal Maras wrote:
I have read http://php.net/fopen from top to bottom, but I could not
find
how to get  system error number.
With set_error_handler I can get string for example
   
fopen(hmc_configuration.cfg)
[function.fopen
 http://ds63450.mspr.detemobil.de/%7Emmaras/HMC/function.fopen]:
failed to open stream: Permission denied
   
but I need integer number not string, because string error messages
depends
on locale setting.
 Of course, I can test some conditions before fopen, but it is not
enough
for me.
 
   Put in a Feature Request to expose the error number from the OS, I
   guess...
 
   http://bugs.php.net/
 
   It *seems* like it ought to be reasonable enough to this naive user.
 
 
   --
   Some people have a gift link here.
   Know what I want?
   I want you to buy a CD from some indie artist.
   http://cdbaby.com/from/lynch
   Yeah, I get a buck. So?
 
   --
 
 
  PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 



Re: [PHP] Session destruction problem

2008-02-24 Thread Shawn McKenzie
Adil Drissi wrote:
 Hi,
 
 I made an error i was using
 unset($_SESSION[sessioname]) instead of
 unset($_SESSION). I'm sorry, but anyway, now i want to
 give another detail. All the time i was testing with
 opera. After testing in firefox and ie there is no
 problem with the code i posted.
 

Yes, that was the suggestion six days ago ;-)

-Shawn

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



Re: [PHP] Shopping Carts

2008-02-24 Thread Shawn McKenzie
 questions and help out people who try and stumble...

I'm less likely to help someone who tries to stumble.

-Shawn

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



Re: [PHP] Shopping Carts

2008-02-24 Thread Robert Cummings
On Sun, 2008-02-24 at 09:43 -0600, Shawn McKenzie wrote:
  questions and help out people who try and stumble...
 
 I'm less likely to help someone who tries to stumble.

In case you weren't be sarcastic... the intent of the above line was
probably the following:

   ...questions and help out people who try... and stumble...

Or more clearly:

   ...questions and help out people who try but stumble...

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: temporary error

2008-02-24 Thread Zoltán Németh
2008. 02. 22, péntek keltezéssel 14.49-kor Greg Donald ezt írta:
 On 2/22/08, Daniel Brown [EMAIL PROTECTED] wrote:
  So help me God
 
 Speaking of imaginary things, check out this new site I built few weeks back:
 
 http://rewriteproject.com/
 
 I do believe I am the first person to ever tag cloud a bible  :)

hehe that site rocks :)

greets
Zoltán Németh

 
 
 -- 
 Greg Donald
 http://destiney.com/
 

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



[PHP] RE: temprorary error

2008-02-24 Thread Mary Anderson

Hey guys,
Isn't this thread a bit OT?
Anyway, as  areligious person I have to say that I really do not 
like to hear religions trashed and smeared the way you are doing.  And 
just for the record, we Quakers do not believe God tells us to kill 
people and we have no priests.


Mary Anderson

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



Re: [PHP] RE: temprorary error

2008-02-24 Thread Zoltán Németh
2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:
 Hey guys,
  Isn't this thread a bit OT?

well, for a php list sure it is... but not the first one, and it seems
to me that many members of the list are interested in it...

  Anyway, as  areligious person I have to say that I really do not 
 like to hear religions trashed and smeared the way you are doing.  And 
 just for the record, we Quakers do not believe God tells us to kill 
 people and we have no priests.

actually I think there was no trashing and smearing here, only some
decent talking about religion and some humor (the 'rewrite the bible'
site)

greets
Zoltán Németh

 
 Mary Anderson
 

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



Re: [PHP] RE: temprorary error

2008-02-24 Thread Robert Cummings

On Sun, 2008-02-24 at 09:59 -0800, Mary Anderson wrote:
 Hey guys,
  Isn't this thread a bit OT?

Probably.

  Anyway, as  areligious person I have to say that I really do not 
 like to hear religions trashed and smeared the way you are doing.  And 
 just for the record, we Quakers do not believe God tells us to kill 
 people and we have no priests.

I dunno... as a religious person I would think you would think it was on
topic. After all according to your philosophy, God begat creation,
creation begat humans, humans begat Rasmus, Rasmus begat PHP. Who's
trashing religion anyways? I don't think I heard any trashing... or do
you mean the biblical parody site? Seems that's humour, not trashing.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] PHPTriad and php error

2008-02-24 Thread hE

hi to all,
I set up phptriad on my computer running windows xp. When I tried to 
test php with the following program I got an error Parse error: parse 
error, expecting `','' or `';'' in C:\apache\htdocs\mytest.php on line 10


html
head
titlePHP Test/title
/head
body
pThis is an HTML line
p
?php

echo “This is a PHP line”;
phpinfo();
?
/body/html

what is the reason?

p.s. phpinfo.php which comes with the installation executes correctly.

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



RE: [PHP] Shopping Carts

2008-02-24 Thread Bastien Koert

 To: php-general@lists.php.net Date: Sun, 24 Feb 2008 09:43:20 -0600 From: 
 [EMAIL PROTECTED] Subject: Re: [PHP] Shopping Carts   questions and help 
 out people who try and stumble...  I'm less likely to help someone who 
 tries to stumble.  -Shawn  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
 
I usually stumble after too much beer ;-)
 
bastien
_



Re: [PHP] PHPTriad and php error

2008-02-24 Thread hE
thanks for the help. I am a C/C++ programmer and decide to learn php and 
mysql to develop web pages. is it the correct place to ask questions 
similar to this? or is there any other group suitable for this?


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



RE: [PHP] PHPTriad and php error

2008-02-24 Thread Bastien Koert

 To: php-general@lists.php.net Date: Sun, 24 Feb 2008 20:53:03 +0200 From: 
 [EMAIL PROTECTED] Subject: [PHP] PHPTriad and php error  hi to all, I set 
 up phptriad on my computer running windows xp. When I tried to  test php 
 with the following program I got an error Parse error: parse  error, 
 expecting `','' or `';'' in C:\apache\htdocs\mytest.php on line 10  
 html head titlePHP Test/title /head body pThis is an HTML 
 line p ?php  echo “This is a PHP line”; phpinfo(); ? 
 /body/html  what is the reason?  p.s. phpinfo.php which comes with 
 the installation executes correctly.  --  PHP General Mailing List 
 (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
 
Use proper quotes (single or double as long as you are consistent) to wrap the 
text. That is what the error is telling you.
 
Note that when using quotes, double quotes will eveluate php variables 
correctly, while single quotes treat them as text.
 
bastien
_



[PHP] mysql test and error

2008-02-24 Thread hE

hi,
I found an e-book in the net about php and mysql and with its sample 
program I am trying to test whether I have mysql working correctly or 
not. the following program gives error message. why?


html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php3
$host=”localhost”;
$user=”root”;
$password=””;
mysql_connect($host,$user,$password);
$sql=”show status”;
$result = mysql_query($sql);
if ($result == 0)
echo “bError “ . mysql_errno() . “: “
. mysql_error() . “/b”;
else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b
/td/tr
?php3
for ($i = 0; $i  mysql_num_rows($result); $i++) {
echo “TR”;
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo “TD” . $row_array[$j] . “/td”;
}
echo “/tr”;
}
?
/table
?php3 } ?
/body/html

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



RE: [PHP] PHPTriad and php error

2008-02-24 Thread Bastien Koert

This is a good place, other include various forums and the manual
 
bastien To: php-general@lists.php.net Date: Sun, 24 Feb 2008 21:21:01 +0200 
From: [EMAIL PROTECTED] Subject: Re: [PHP] PHPTriad and php error  thanks 
for the help. I am a C/C++ programmer and decide to learn php and  mysql to 
develop web pages. is it the correct place to ask questions  similar to this? 
or is there any other group suitable for this?  --  PHP General Mailing List 
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 
_



Re: [PHP] RE: temprorary error

2008-02-24 Thread tedd

At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:

2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:

 Hey guys,
  Isn't this thread a bit OT?


well, for a php list sure it is... but not the first one, and it seems
to me that many members of the list are interested in it...


  Anyway, as  areligious person I have to say that I really do not
 like to hear religions trashed and smeared the way you are doing.  And
 just for the record, we Quakers do not believe God tells us to kill
 people and we have no priests.


actually I think there was no trashing and smearing here, only some
decent talking about religion and some humor (the 'rewrite the bible'
site)



I'm sure you'll get an argument over the no trashing and smearing here claim.

But, in your defense, you probably don't realize 
the disrespect shown, or that's perceived by 
others, regarding beliefs.


It's a touchy subject and usually not one to 
discuss with a wide range of different beliefs, 
some of which hold other's beliefs in low esteem 
-- as does the 'rewrite the bible' site. 
Incidentally, which started the religious portion 
of this thread.


I think we've about beat this to death, so we can 
let it go and get our collective thoughts back to 
more worldly endeavors. Besides, I'm starting to 
get emails from the OT police, which I tend to 
agree with.


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: mysql test and error

2008-02-24 Thread Nathan Rixham

hE wrote:

hi,
I found an e-book in the net about php and mysql and with its sample 
program I am trying to test whether I have mysql working correctly or 
not. the following program gives error message. why?


html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php3
$host=”localhost”;
$user=”root”;
$password=””;
mysql_connect($host,$user,$password);
$sql=”show status”;
$result = mysql_query($sql);
if ($result == 0)
echo “bError “ . mysql_errno() . “: “
. mysql_error() . “/b”;
else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b
/td/tr
?php3
for ($i = 0; $i  mysql_num_rows($result); $i++) {
echo “TR”;
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo “TD” . $row_array[$j] . “/td”;
}
echo “/tr”;
}
?
/table
?php3 } ?
/body/html


because the ebook is ancient and ?php3 isn't used anymore [i'd sure hope]

try..

html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php
$host=”localhost”;
$user=”root”;
$password=””;
mysql_connect($host,$user,$password) or die(mysql_errno() . “: “. 
mysql_error());

$sql=”show status”;
$result = mysql_query($sql);
if ($result == 0)
echo “bError “ . mysql_errno() . “: “
. mysql_error() . “/b”;
else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b
/td/tr
?php
for ($i = 0; $i  mysql_num_rows($result); $i++) {
echo “TR”;
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo “TD” . $row_array[$j] . “/td”;
}
echo “/tr”;
}
?
/table
/body/html

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



Re: [PHP] mysql test and error

2008-02-24 Thread Brady Mitchell


On Feb 24, 2008, at 1135AM, hE wrote:


hi,
I found an e-book in the net about php and mysql and with its sample  
program I am trying to test whether I have mysql working correctly  
or not. the following program gives error message. why?


What exactly does the error message say? We can help troubleshoot  
errors much better with error messages. :)



html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php3


Change ?php3 to ?php - everywhere in your code.

By the fact that it's using ?php3 I'm guessing this is a very old  
tutorial. I'd strongly suggest using a more recent tutorial. There  
have been lots of changes since PHP3 and there's no reason to start  
with such an old version.


Here are some places to start:

http://devzone.zend.com/article/627-PHP-101-PHP-For-the-Absolute-Beginner
http://hudzilla.org/phpwiki/index.php?title=Main_Page

I also strongly suggest taking some time to go through the manual.  
Browse through the different sections and get an idea for what is  
available. Obviously I'm not suggesting you memorize the manual, but  
I've found it very helpful to occasionally browse through a section or  
two in the manual, I always seem to find functions I wasn't aware of  
before. This really helps in deciding the best way to solve a problem.



if ($result == 0)
echo “bError “ . mysql_errno() . “: “
. mysql_error() . “/b”;


Is this all on one line in your code? If not it needs to be inside  
curly braces, though this could be just a case of long lines be broken  
up by your email software. For consistency and readability, especially  
when starting with a new language, I tend to always use curly braces -  
even if not needed.


if ($result == 0)
{
echo 'bError ' . mysql_errno() . ': '. mysql_error() . '/b';
}


else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b
/td/tr
?php3
for ($i = 0; $i  mysql_num_rows($result); $i++) {
echo “TR”;
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo “TD” . $row_array[$j] . “/td”;
}
echo “/tr”;
}
?


One last suggestion, indent your code. For example:

else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b/td/tr
?php
for ($i = 0; $i  mysql_num_rows($result); $i++)
{
echo 'TR';
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo 'TD'. $row_array[$j] . '/td';
}
echo '/tr';
}
?
/table
?php
}
?

While it's not necessary, I find it much easier to read and  
troubleshoot code when indented.


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



Re: [PHP] RE: temprorary error

2008-02-24 Thread Robert Cummings

On Sun, 2008-02-24 at 15:55 -0500, tedd wrote:
 At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:
 2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:
   Hey guys,
Isn't this thread a bit OT?
 
 well, for a php list sure it is... but not the first one, and it seems
 to me that many members of the list are interested in it...
 
Anyway, as  areligious person I have to say that I really do not
   like to hear religions trashed and smeared the way you are doing.  And
   just for the record, we Quakers do not believe God tells us to kill
   people and we have no priests.
 
 actually I think there was no trashing and smearing here, only some
 decent talking about religion and some humor (the 'rewrite the bible'
 site)
 
 
 I'm sure you'll get an argument over the no trashing and smearing here 
 claim.
 
 But, in your defense, you probably don't realize 
 the disrespect shown, or that's perceived by 
 others, regarding beliefs.
 
 It's a touchy subject and usually not one to 
 discuss with a wide range of different beliefs, 
 some of which hold other's beliefs in low esteem 
 -- as does the 'rewrite the bible' site. 
 Incidentally, which started the religious portion 
 of this thread.
 
 I think we've about beat this to death

So let's resurrect it!! *ducks and runs away cackling*

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] mysql test and error

2008-02-24 Thread hE

The following program gave the error:

 Parse error: parse error in C:\apache\htdocs\mysqltest.php on line 10


html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php
$host=”localhost”;
$user=”root”;
$password=””;
mysql_connect($host,$user,$password);
$sql=”show status”;
$result = mysql_query($sql);
if ($result == 0)
echo 'bError ' . mysql_errno() . ': '. mysql_error() . '/b';
else
{
?
!-- Table that displays the results --
table border=”1”
trtdbVariable_name/b/tdtdbValue/b
/td/tr
?php
for ($i = 0; $i  mysql_num_rows($result); $i++) {
echo 'TR';
$row_array = mysql_fetch_row($result);
for ($j = 0; $j  mysql_num_fields($result); $j++)
{
echo 'TD'. $row_array[$j] . '/td';
}
echo '/tr';
}
?
/table
/body/html

what is the reason?

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



Re: [PHP] mysql test and error

2008-02-24 Thread Brady Mitchell


On Feb 24, 2008, at 200PM, hE wrote:


The following program gave the error:

Parse error: parse error in C:\apache\htdocs\mysqltest.php on line  
10


Did you copy/paste the code? If so maybe the quotation marks are the  
fancy smart quotes like MS Office likes to use. Try replacing your  
quotes with regular old quotation marks.


Brady

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



Re: [PHP] RE: temprorary error

2008-02-24 Thread Nathan Rixham

Robert Cummings wrote:

On Sun, 2008-02-24 at 15:55 -0500, tedd wrote:

At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:

2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:

 Hey guys,
  Isn't this thread a bit OT?

well, for a php list sure it is... but not the first one, and it seems
to me that many members of the list are interested in it...


  Anyway, as  areligious person I have to say that I really do not
 like to hear religions trashed and smeared the way you are doing.  And
 just for the record, we Quakers do not believe God tells us to kill
 people and we have no priests.

actually I think there was no trashing and smearing here, only some
decent talking about religion and some humor (the 'rewrite the bible'
site)


I'm sure you'll get an argument over the no trashing and smearing here claim.

But, in your defense, you probably don't realize 
the disrespect shown, or that's perceived by 
others, regarding beliefs.


It's a touchy subject and usually not one to 
discuss with a wide range of different beliefs, 
some of which hold other's beliefs in low esteem 
-- as does the 'rewrite the bible' site. 
Incidentally, which started the religious portion 
of this thread.


I think we've about beat this to death


So let's resurrect it!! *ducks and runs away cackling*

Cheers,
Rob.


you know looking through the list - I'm struggling to find a thread that 
rob's participated in and *not* had the last say on..


[can you resist?]

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



Re: [PHP] RE: temprorary error

2008-02-24 Thread Shawn McKenzie
Nathan Rixham wrote:
 Robert Cummings wrote:
 On Sun, 2008-02-24 at 15:55 -0500, tedd wrote:
 At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:
 2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:
  Hey guys,
   Isn't this thread a bit OT?
 well, for a php list sure it is... but not the first one, and it seems
 to me that many members of the list are interested in it...

   Anyway, as  areligious person I have to say that I really do not
  like to hear religions trashed and smeared the way you are doing. 
 And
  just for the record, we Quakers do not believe God tells us to kill
  people and we have no priests.
 actually I think there was no trashing and smearing here, only some
 decent talking about religion and some humor (the 'rewrite the bible'
 site)

 I'm sure you'll get an argument over the no trashing and smearing
 here claim.

 But, in your defense, you probably don't realize the disrespect
 shown, or that's perceived by others, regarding beliefs.

 It's a touchy subject and usually not one to discuss with a wide
 range of different beliefs, some of which hold other's beliefs in low
 esteem -- as does the 'rewrite the bible' site. Incidentally, which
 started the religious portion of this thread.

 I think we've about beat this to death

 So let's resurrect it!! *ducks and runs away cackling*

 Cheers,
 Rob.
 
 you know looking through the list - I'm struggling to find a thread that
 rob's participated in and *not* had the last say on..
 
 [can you resist?]

This one, and I'll continue saying this one...

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



[PHP] Re: When to use design patterns?

2008-02-24 Thread Nathan Rixham

carlos wrote:

skylark wrote:


Design patterns are really hot today.
And I am really interested when and how often they are used.

It is said that 99% of the projects don't need them.



Design patterns are used to solve common problems to in OOP programming.

If you use OOP, chances are you have used a design pattern without even 
being aware of it.


I like to make the right hand side of all my code look like a 
contemporary ascii art vase.


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



RE: [PHP] Re: Plant Extracts and Our Factory

2008-02-24 Thread Wolf
That's easy

He thinks that php is asp plus lead, so he figured that we could get the plant 
extracts with the added lead and be set!

Gotta love morons...



-Original Message-
From: Shawn McKenzie [EMAIL PROTECTED]
Sent: Sunday, February 24, 2008 10:37 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Plant Extracts and Our Factory

[EMAIL PROTECTED] wrote:
 Greetings!
 
 Are you looking for the best quality natural plant extract products at great 
 prices and with speedy and reliable delivery? If so, you are having a good 
 day because ShanShan Biotechnology is ready to serve you.
 
 We own advanced equipment and technology, utilize high-quality materials and 
 solvent, and employ a highly-skilled staff operating under strict management. 
 After capital investments amounting to nearly US$80 million, our company has 
 the largest extraction base in Asia. We introduced two sets of automatic 
 supercritical carbon dioxide extract equipment (1500L¡Á3 and 3500L¡Á3 ) from 
 UHDE company, Krupp Group (Germany). We have one set of refining equipment 
 from Messo Company (also Germany). And three sets of advanced dynamic 
 countercurrent extraction equipment using membrane filtration and 
 concentration. Our factory covers an area of 1,520,000 square meters. 
 Our factory got the certificate of ISO9001, ISO14001, HACCP and Kosher, 
 Meanwhile we have advanced analytical apparatus such as HPLC, GC and UV etc. 
 
 We are already producing the high-ratio water-soluble Cinnamon Bark Extract 
 with de-cinnamic aldehyde and de-coumarin. We also produce the other plant 
 extracts, ingredients and plants oils by Supercritical Fluid extraction with 
 natural carbon dioxide. HPLC, TLC, GC chromatograms and factory image are 
 available on request.
 
 Write to us for more info.
 
 Best wishes,
 
 Mr. Dong
 ShanShan Biotechnology co., ltd. Wuhu. China ShanShan Group.
 T:+86 553 5719388
 F:+86 553 5719963
 E-mail: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Web: www.naturalcn.com
 Add: Gangwan Road, Economic  Tech zone, Wuhu,China, 241007

Mr. Dong, your site is in ASP, why are you posting here?

-Shawn

-- 
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: temprorary error

2008-02-24 Thread Wolf
Then make use of your delete key.



-Original Message-
From: Mary Anderson [EMAIL PROTECTED]
Sent: Sunday, February 24, 2008 12:59 PM
To: php-general@lists.php.net
Subject: [PHP] RE: temprorary error

Hey guys,
 Isn't this thread a bit OT?
 Anyway, as  areligious person I have to say that I really do not 
like to hear religions trashed and smeared the way you are doing.  And 
just for the record, we Quakers do not believe God tells us to kill 
people and we have no priests.

Mary Anderson

-- 
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: When to use design patterns?

2008-02-24 Thread Larry Garfield
On Saturday 23 February 2008, carlos wrote:
 skylark wrote:
  Design patterns are really hot today.
  And I am really interested when and how often they are used.
 
  It is said that 99% of the projects don't need them.

 Design patterns are used to solve common problems to in OOP programming.

 If you use OOP, chances are you have used a design pattern without even
 being aware of it.

Untrue.  Design patterns are not OOP-specific, although they are frequently 
discussed in OOP terms.  

Design patterns are just that: A formalization of various common patterns that 
come up over and over in programming.  Ever get the feeling wow, I know I've 
written something kinda like this at least three times now?  That means it's 
probably a design pattern of some kind.

Studying design patterns helps you recognize a give problem as being similar 
to another, so the solution is probably similar.  It also can alert you to 
common pitfalls and common ways around them.  

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it.  -- Thomas 
Jefferson

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



[PHP] Copying specific fields from table to table

2008-02-24 Thread Rob Gould
I've got 2 tables.  One table which contains a series of barcodes assigned to 
product id #'s, and another table with JUST product id #'s.

I need to somehow transfer all the barcodes from the first table into the 
second table, but only where the id #'s match.

Can anyone tell me if this is something that can be done with just a SQL 
statement, or do I need to write a PHP script to loop through the records of 
both tables and do the copying/mapping?

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



Re: [PHP] Copying specific fields from table to table

2008-02-24 Thread Chris

Rob Gould wrote:

I've got 2 tables.  One table which contains a series of barcodes assigned to 
product id #'s, and another table with JUST product id #'s.

I need to somehow transfer all the barcodes from the first table into the 
second table, but only where the id #'s match.

Can anyone tell me if this is something that can be done with just a SQL 
statement, or do I need to write a PHP script to loop through the records of 
both tables and do the copying/mapping?


insert into table (field1, field2) select field1, field2 from t1 inner 
join t2 using (field_id);


or something like that.

http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

--
Postgresql  php tutorials
http://www.designmagick.com/

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



RE: [PHP] URL modification

2008-02-24 Thread Xavier de Lapeyre
thnks

Xavier 
Please consider the environment before printing this mail note. 



-Original Message-
From: Nathan Rixham [mailto:[EMAIL PROTECTED] 
Sent: vendredi 22 février 2008 18:58
To: php-general@lists.php.net
Subject: Re: [PHP] URL modification

Richard Heyes wrote:
 H... made a quick look into it.
 Seems to be apache compatible.
 I'm designing a site to be hosted on an IIS Server.

 Does it still works there?
 
 On IIS I belive the default document is default.htm Though you should be 
 able to modify this to whatever you please. On Apache it is index.html 
 or index.php (for example). Regardless you want this to be parsed by 
 PHP, and then you can stick the following in it:
 
 ?php
 header('http://www.example.com/login.php');
 ?
 
 Place this file in your login directory and then you'll be able to 
 publish URLs such as http://www.example.com/login The trailing slash is 
 not necessary if login is a directory. For example:
 
 http://www.websupportsolutions.co.uk/demo
 

To use url's like http://domain.com/login/ as opposed to 
http://domain.com/login.php you can take multiple approaches.

The first and simplest is to simply save your login.php as /login/index.php
to use this approach you need to ensure that index.php is listed as a 
default page.

In IIS you can set the default page(s) to be whatever you like:
- Open IIS Manager
- Server - Websites - Right Click [properties]
- select Documents tab
- ensure Enable default content page is ticked
- ensure index.php is listed
- if not then click [add] and enter index.php
- continue to add any other default pages [index.html, index.shtml etc]

The second common solution [and I'd advise to get used to it asap] is to 
use URL rewriting.

In short url rewriting involves defining rules which the web server 
uses to direct http requests to resources on the server.
eg: direct domain.com/all_our_news to /index.php?newsitem=all

a quick intro guide can be found here:
http://www.sitepoint.com/article/guide-url-rewriting

For URL rewriting in IIS use ISAPI Rewrite - http://www.isapirewrite.com/

in apache use mod_rewrite
[apache1.3] httpd.apache.org/docs/1.3/mod/mod_rewrite.html
[apache2.0] httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Both are pretty much identical when it comes to the end rewrite rules.

Hope that helps a little

Nathan

-- 
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] PHP 24 hour processes?

2008-02-24 Thread Zoran Bogdanov
Hi,

How can you perform a timed event in PHP; for example:

Count 24 hours and then delete all rows in a database...

Thank you! 

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



Re: [PHP] PHP 24 hour processes?

2008-02-24 Thread Paul Scott

On Mon, 2008-02-25 at 07:39 +0100, Zoran Bogdanov wrote:
 How can you perform a timed event in PHP; for example:
 
 Count 24 hours and then delete all rows in a database...
 

I thought that this question was answered in some detail before...

Anyway, on *NIX based systems use cron.daily or on 'doze, use AT or
command scheduler I think it's called.

Either that or use a long running PHP process with ignore_user_abort()
and a time of 86400 seconds :)

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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