Don Wieland wrote:
In one of my forms, I am building a variable that I can use as an
INSERT string.
On my form, I have several DATE fields which exist of 3 fields MM - DD
-
when I build my string it looks like this:
array('dbf'='applicant_dob',
On Thu, 2010-04-15 at 09:46 +0200, cr.vege...@gmail.com wrote:
Hi All,
Is there an option in PHP to change the behavior of NULL in PHP functions ?
Now PHP uses NULL as a 0 (zero) for arithmetic, for example:
NULL + 6 = 6
NULL * 6 = 0
NULL / 6 = 0
6 / NULL = Division by zero
What I
because arithmetic operations with Unknown operands should result to
Unknown ...
in PHP Unknown values are represented by NaN, not NULL
http://php.net/manual/en/function.is-nan.php
but what surprises me is
is_nan(6/0) = (bool)false (along with a warning)
Now PHP uses NULL as a 0 (zero
From: Ashley Sheridan
To: cr.vege...@gmail.com
Cc: php-general@lists.php.net
Sent: Thursday, April 15, 2010 10:08 AM
Subject: Re: [PHP] changing NULL behavior in PHP arithmetic
On Thu, 2010-04-15 at 09:46 +0200, cr.vege...@gmail.com wrote:
Hi All,
Is there an option in PHP
Greetings,
I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?
Ex:
If ($a¹ == ANYTHING¹) {
some action
}else{
some other action
}
Thank you for any help.
--
Steve M.
On 31/10/2007, Steve Marquez [EMAIL PROTECTED] wrote:
Greetings,
I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?
Ex:
If (Œ$a¹ == Œ ANYTHING¹) {
oh dear, krazee
On 10/31/07, Robin Vickery [EMAIL PROTECTED] wrote:
On 31/10/2007, Steve Marquez [EMAIL PROTECTED] wrote:
Greetings,
I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?
2007. 10. 31, szerda keltezéssel 10.48-kor Steve Marquez ezt írta:
Greetings,
I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?
Ex:
If (Œ$a¹ == Œ ANYTHING¹) {
So, for fun, (well, *MY* idea of fun) I implemented a dirt-simple
CAPTCHA.
The image is totally OCR-able, but anybody wants to work that hard at
it can have at it. That's modular enough to (really) fix later
anyway/
After lots of encryption/decryption with urlencoding, htmlentities,
and
On Fri, 2005-10-21 at 20:45 -0500, Richard Lynch wrote:
Anyway, my question is, what is the morally correct function to use to
remove these null characters from the end of my string?
I'm guessing 'rtrim' would work, but is a NUL char really whitespace?
I think rtrim() is probably your best
Hi,
Up to this point in time I used to construct my insert statements like this
$qid = mysql_query('INSERT INTO MYTABLE (
column1,
column2,
) VALUES (
'.$value1.',
$value2 = strlen($value2) ? $value2 : 'NULL';
On Tue, October 18, 2005 11:15 am, Shaun wrote:
Hi,
Up to this point in time I used to construct my insert statements like
this
$qid = mysql_query('INSERT INTO MYTABLE (
column1,
On Wed, March 16, 2005 2:32 pm, Zinovi Boyadjiev said:
I am getting this strange error while developing imap mail to mysql
inporting script :
PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
This looks like a custom error message and/or something coming about
Richard Lynch wrote:
On Wed, March 16, 2005 2:32 pm, Zinovi Boyadjiev said:
I am getting this strange error while developing imap mail to mysql
inporting script :
PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
This looks like a custom error message and/or something
Hello,
I am getting this strange error while developing imap mail to mysql
inporting script :
PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
I am getting it at the end of the script execution without affecting any
actual script functionality.
I am using PHP 4.3.10
Hello,
I am having one string variable which has the value fetched from the
mysql table. Is it possible to find '\0' character in that string ?
Regards,
Uma
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
* Thus wrote T UmaShankari:
Hello,
I am having one string variable which has the value fetched from the
mysql table. Is it possible to find '\0' character in that string ?
http://php.net/strstr
http://php.net/strpos
strstr($nulledstring, \0);
strpos($nulledstring, \0);
Curt
--
The
Hello,
Can any one tell me how to assign a null value to a php string?. I tried
assigning empty single quote,backslash with zero,double quotes also. but
nothing works..
Regards,
Uma
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thursday 02 September 2004 20:23, T UmaShankari wrote:
Can any one tell me how to assign a null value to a php string?. I tried
assigning empty single quote,backslash with zero,double quotes also. but
nothing works..
manual Types NULL
--
Jason Wong - Gremlins Associates -
T UmaShankari wrote:
Hello,
Can any one tell me how to assign a null value to a php string?. I
tried assigning empty single quote,backslash with zero,double quotes
also. but nothing works..
Regards,
Uma
Use the manual, Luke.
http://us4.php.net/manual/en/language.types.null.php
--
By-Tor.com
Hi,
Does 0(zero) really equate to null?
if( 0 == null )
{
echo 'true';
}
else echo 'false';
Result echo's: true
This can not be right, can it? I have never heard of such a thing. As
far as I recall from any language null is of no value equaling nothing?
So how can it equal 0?
Any
is of no value equaling nothing?
So how can it equal 0?
Any help or explanation would be greatly appreciated.
In C the NULL macro is equal to 0. In PHP null is equivalent to 0. The
test will fail if you use === instead.
Cheers,
Rob
Does 0(zero) really equate to null?
if( 0 == null )
{
echo 'true';
}
else echo 'false';
Result echo's: true
This can not be right, can it? I have never heard of such a
thing. As far as I recall from any language null is of no
value equaling nothing?
So how can it equal
Hi Robert,
Thanks.
Regards,
Justin Palmer
-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 12:22 PM
To: [EMAIL PROTECTED]
Cc: PHP-General
Subject: Re: [PHP] 0 == null ?
On Mon, 2004-05-10 at 15:17, Justin Palmer wrote:
Hi,
Does 0(zero
reposted on this list as requested, an initial reply is include:
Original Message
Delivered-To: [EMAIL PROTECTED]
To make matters worse, $x[5] = NULL; causes array_key_exists
to return true for 5 even though isset($x[5]) is false and even
worse, unset is the function you use to
William Lovaton wrote:
El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió:
Andy B wrote:
how would you assign NULL to a variable if its original value is ? otherwise leave it with its value...
if($var === '') $var = NULL;
what about: if ($var == '') unset($var);
No - NULL is not the
Marek Kilimajer wrote:
William Lovaton wrote:
El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió:
Andy B wrote:
how would you assign NULL to a variable if its original value is ?
otherwise leave it with its value...
if($var === '') $var = NULL;
what about: if ($var == '')
Andy B wrote:
how would you assign NULL to a variable if its original value is ? otherwise leave it with its value...
if($var === '') $var = NULL;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió:
Andy B wrote:
how would you assign NULL to a variable if its original value is ? otherwise
leave it with its value...
if($var === '') $var = NULL;
what about: if ($var == '') unset($var);
-William
--
PHP General Mailing List
how would you assign NULL to a variable if its original value is ? otherwise leave
it with its value...
the form im working on has a date field called date on the form itself. that date
will get turned into $_SESSION[add][date] on the next page...
i want it so if the person filling out the form
Gohaku wrote:
Thanks.
Below is what I changed to session.php.
Are there any possible problems with my changes?
On Mar 23, 2004, at 4:28 PM, Justin Patrin wrote:
?
/***Session.php**/
$varcount = 0;
if($name){$varcount++;}
if($number){$varcount++;}
Gohaku wrote:
Apologies if this has been asked before,
I'm experiencing problems with Session Variables and Radio Inputs values.
For some reason, after I use session_register(number) where
$number has 3 possible values { 1,2,3 }, $number IS NULL.
If I don't use session_register(number), $number
Thanks.
Below is what I changed to session.php.
Are there any possible problems with my changes?
On Mar 23, 2004, at 4:28 PM, Justin Patrin wrote:
?
/***Session.php**/
$varcount = 0;
if($name){$varcount++;}
if($number){$varcount++;}
session_start();
?
function countNulls($array)
{
if (!is_array($array)) {
return(NULL);
}
reset($array);
$count=0;
while(list(,$val)=each($array)) {
if ($val===NULL) {
$count++;
}
}
return($count);
}
?
Aris Santillan wrote:
hi
how to count null values
Hi,
New to the list and hoping someone might be able to help me.
I have been using PHP scripts that are to maintain a company address book
with a lot of data about contacts, both inside and outside the company. The
scripts, which are generating html pages and reading input values back in,
have
if you move your mouse over the Download Now section... what is the
statusbar displaying??
Edward
- Original Message -
From: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 5:05 PM
Subject: RE: [PHP] Re: NULL value
warning but probably
lose the second which is useful.
Best regards,
Andrey Hristov
- Original Message -
From: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 6:05 PM
Subject: RE: [PHP] Re: NULL value for variable
I
:05 PM
Subject: RE: [PHP] Re: NULL value for variable
I comment it out but I got this error:
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 22
Could not get file list: You have an error in your SQL syntax near '' at
line 1
Thanks
));
?
-Original Message-
From: Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:52 PM
To: Andrey Hristov
Cc: Narvaez, Teresa; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: NULL value for variable
On Thu, 2002-02-21 at 08:16, Andrey Hristov
PictureNumber specified: ($fileId));
?
-Original Message-
From: Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:52 PM
To: Andrey Hristov
Cc: Narvaez, Teresa; [EMAIL PROTECTED]
Subject:Re: [PHP] Re: NULL value for variable
: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Lars Torben Wilson' [EMAIL PROTECTED]; Andrey Hristov
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 11:04 PM
Subject: RE: [PHP] Re: NULL value for variable
Hello, Thanks for your replies. I still cannot access the variable fileId
that global $fileId; shouldn't be there in downloadfile.php
Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Hello,
: I am runnig php 4.1.1. In the configuration, register_globals is
: ON.
: I have two programs and I want to pass the value from
if (empty($value)) { ... }
On Wed, 1 Aug 2001, Craig Vincent wrote:
When a field is declared as an integer, not null and is the primary,
how would I address it's empty set?
ex: if($value == ???)
{
bla
bla
bla
}
My condition
Hi,
When a field is declared as an integer, not null and is the primary,
how would I address it's empty set?
ex: if($value == ???)
{
bla
bla
bla
}
My condition wants there to be nothing in $value.
--
PHP General Mailing
When a field is declared as an integer, not null and is the primary,
how would I address it's empty set?
ex: if($value == ???)
{
bla
bla
bla
}
My condition wants there to be nothing in $value.
Are you referring to the (INT, NOT
on 8/1/01 12:50 PM, Jeremy Morano at [EMAIL PROTECTED] wrote:
Hi,
When a field is declared as an integer, not null and is the primary,
how would I address it's empty set?
nut sure i understand the question. if the field is NOT NULL, how could
$value be empty?
ex: if($value == ???)
{
t: Tuesday, January 23, 2001 3:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] check null value
If I have one input text box that when it is submitted to next page, I want
to check first if it is nothing, then write "na" on next page, else just
echo whatever it is, is it correct to do t
If I have one input text box that when it is submitted to next page, I want to check
first if it is nothing, then write "na" on next page, else just echo whatever it is,
is it correct to do this?
if ($fieldname == ""){
$fieldname ="na";
}
...
(then come to the html bit below)
td?php echo
48 matches
Mail list logo