class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
...
public static function getMessage($ec)
{
$text = '';
if (array_key_exists($ec, Pg_Error::$errors))
{
$text =
Gary . wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint
violated');
...
public static function getMessage($ec)
{
$text = '';
if (array_key_exists($ec, Pg_Error::$errors))
{
On 28 April 2010 08:39, Gary . php-gene...@garydjones.name wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
...
public static function getMessage($ec)
{
$text = '';
if (array_key_exists($ec,
Per Jessen wrote:
Gary . wrote:
Calling it, the array_key_exists call always returns false
...
and I can't see what I've done wrong :(
Might this be better:
public static function getMessage($ec)
{
$text = '';
if (array_key_exists($ec, $errors))
{
On 4/28/10, Jochem Maas wrote:
Op 4/28/10 7:39 AM, Gary . schreef:
class Pg_Error
{
const INTEGRITY_CONST_UNIQUE = '23505';
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
...
public static function getMessage($ec)
{
On 4/28/10, Jochem Maas wrote:
class Pg_Error
{
const INTEGRITY_CONST_UNIQUE = '23505';
this is a class constant
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint
violated');
[...]
unfortunately you cannot use a
On 28 April 2010 10:57, Gary . php-gene...@garydjones.name wrote:
On 4/28/10, Jochem Maas wrote:
class Pg_Error
{
const INTEGRITY_CONST_UNIQUE = '23505';
this is a class constant
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness
Gary . wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
Shouldn't this be:
array(self::INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
...
public static function getMessage($ec)
{
On 4/28/10, Thijs Lensselink wrote:
Gary . wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
Shouldn't this be:
array(self::INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
Yes, or something very like
Gary . wrote:
On 4/28/10, Thijs Lensselink wrote:
Gary . wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
Shouldn't this be:
array(self::INTEGRITY_CONST_UNIQUE = 'uniqueness constraint violated');
On Wed, Apr 28, 2010 at 2:17 PM, Thijs Lensselink wrote:
Gary . wrote:
On 4/28/10, Thijs Lensselink wrote:
Gary . wrote:
class Pg_Error
{
private static $errors =
array(INTEGRITY_CONST_UNIQUE = 'uniqueness constraint
violated');
Shouldn't this be:
9el wrote:
*Note:* It is worth noting that the mail() function is not suitable for
larger volumes of email in a loop. This function opens and closes an SMTP
socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and »
PEAR::Mail_Queue
But in practice. I mean in real life you'll find the mail() function is
disabled in most servers :)
9el wrote:
But in practice. I mean in real life you'll find the mail() function is
disabled in most servers :)
That's nice, but how many is larger volumes of email? 500? 5,000?
25,000?
I note PEAR:Mail has 3 open bugs, PEAR:Mail_Mime has 23 with 3 open
support requests. PHPMailer was
Hello,
9el wrote:
*Note:* It is worth noting that the mail() function is not suitable for
larger volumes of email in a loop. This function opens and closes an SMTP
socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and »
This is driving me nuts. I am getting blank emails and the only information
that is being passed to MySQL is the IP address.
Can someone tell me what is wrong with this?
form method=post action=?php echo $_SERVER['PHP_SELF']; ?
div id=important style=visibility:hidden;
pIf you can see
You forgot to mention the method of the form.
form action=... method=post ... /form
Regards,
Igor Escoar
Systems Analyst Interface Designer
--
Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar
On Fri, Apr 3, 2009 at 4:08 PM, Gary
Its there...
Igor Escobar titiolin...@gmail.com wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
You forgot to mention the method of the form.
form action=... method=post ... /form
Regards,
Igor Escoar
Systems Analyst Interface Designer
--
]
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code
Its there...
Igor Escobar titiolin...@gmail.com wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
You forgot to mention the method of the form
emails I assume you mean they have the template
you made but the variables are empty and not zero-length emails.
-Original Message-
From: Gary [mailto:gwp...@ptd.net]
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code
Its
Subject: Re: [PHP] What is wrong with this code
Its there...
Igor Escobar titiolin...@gmail.com wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
You forgot to mention the method of the form.
form action=... method=post ... /form
Regards,
Igor Escoar
: [PHP] What is wrong with this code
I recieve an email, it will contain the ip address, it will also contain
the name:, email: , comments: but not the information from the form of
the name or email or comments.
The database also recieves only the ip address. So I assume those parts
are working
On Friday 03 April 2009 13:08:45 Gary wrote:
This is driving me nuts. I am getting blank emails and the only
information that is being passed to MySQL is the IP address.
Can someone tell me what is wrong with this?
form method=post action=?php echo $_SERVER['PHP_SELF']; ?
div id=important
and not zero-length emails.
-Original Message-
From: Gary [mailto:gwp...@ptd.net]
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code
Its there...
Igor Escobar titiolin...@gmail.com wrote in message
news
*Note:* It is worth noting that the mail() function is not suitable for
larger volumes of email in a loop. This function opens and closes an SMTP
socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and »
PEAR::Mail_Queue packages.
*
This is unrelated, the email sends fine. And it's one per submission.
-Original Message-
From: doctortomor...@gmail.com [mailto:doctortomor...@gmail.com] On
Behalf Of 9el
Sent: Friday, April 03, 2009 3:37 PM
To: Gary
Cc: php-general@lists.php.net
Subject: Re: [PHP] What is wrong
On Fri, 3 Apr 2009 15:08:45 -0400
Gary gwp...@ptd.net wrote:
This is driving me nuts. I am getting blank emails and the only
information that is being passed to MySQL is the IP address.
Can someone tell me what is wrong with this?
If this is in one file, as I assume it is, here's what is
Peter
I had the
if ( isset( $_POST['submit'] ) ) {
in there and it did not work.
I have used this on several sites, the only difference is that I was tyring
to contain it in one file. I also created a file just to process the POST,
but it still did not work.
I was thinkning it was
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--
That was it, but Im sorry, I did not see that Ray had already pointed that
out, so apologies to Ray and many thanks to everyone...
gary
9el le...@phpxperts.net wrote in message
news:79d892150904031305j6e1b00d4qed0d9fbf13437...@mail.gmail.com...
] What is wrong with this code
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a
Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
Have anyone answers on the strange behaviour discussed in the thread ?
I has noted specially:
It works OK in PHP 4.3.6 or when line $db2 = 0; had been commented
in all described versions of PHP.
So next example works perfect:
-
I has noted specially:
It works OK in PHP 4.3.6 or when line $db2 = 0; had been commented
in all described versions of PHP.
So next example works perfect:
-
error_reporting(E_ALL);
$db1 = mysql_connect ('localhost', 'test', '1');
$db2 =
Can one explain me why I has got a result:
-
Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ...
$result = mysql_query('SELECT 1+1', $db1);
-
from next example.
The example does not
Vladimir Shiray wrote:
-
Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ...
$result = mysql_query('SELECT 1+1', $db1);
-
[snip]
$db1 = mysql_connect ('localhost', 'test', '1');
$db2 =
Hello
What is wrong with this code ?
$doWork = $_GET[doWork];
echo $doWork;
echo ( BR);
if ( $doWork = 0) {
exit;
}
else
{
if ( $doWork = 1) {
?
input class=no type=button value=Accept onClick=doAccept();
input class=no type=button value=Reject onClick=doReject();
?
};
if (
On Mon, 2003-09-15 at 15:29, Daniel Szasz wrote:
Hello
What is wrong with this code ?
$doWork = $_GET[doWork];
This is sloppy, put the quotes around the key string doWork.
echo $doWork;
echo ( BR);
if ( $doWork = 0) {
You just assigned 0 to $doWork, try using 0 == $doWork
exit;
}
Daniel Szasz wrote:
What is wrong with this code ?
== instead of =.
--
miro.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
an OR statement/gate;
Carl.
-Original Message-
From: Daniel Szasz [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 3:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What is wrong with this code ?
Hello
What is wrong with this code ?
$doWork = $_GET[doWork];
echo $doWork;
echo
39 matches
Mail list logo