Re: [PHP] Not Null?

2007-10-31 Thread Zoltán Németh
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¹) {
> 
> some action
> 
> }else{
> 
> some other action
> 
> }

try isset($a)

greets
Zoltán Németh

> 
> Thank you for any help.
> 
> --
> Steve M.

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



Re: [PHP] Not Null?

2007-10-31 Thread Daniel Brown
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?
> >
> > Ex:
> >
> > If (Œ$a¹ == Œ ANYTHING¹) {
>
> oh dear, krazee quotes... at least I presume that's what those wierd
> characters are.
>
> Look in the manual for isset() (http://www.php.net/isset) and empty()
> (http://www.php.net/empty).
>
> -robin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Robin, I think you hit it exactly on the head with the quote issue.

Steve, use regular single or double quotes, not any kind of fancy
quotes or backticks.  It may be the editor you're using: if you use
Microsoft Word or another similar word processor, it may replace the
quotes with something it things is "prettier".  If you're using
Windows, use notepad, `edit.com` from the command line, or download
any IDE you'd like - many or which are free and open source, and even
handle PHP specifically.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished

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



Re: [PHP] Not Null?

2007-10-31 Thread Robin Vickery
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 quotes... at least I presume that's what those wierd
characters are.

Look in the manual for isset() (http://www.php.net/isset) and empty()
(http://www.php.net/empty).

-robin

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



[PHP] Not Null?

2007-10-31 Thread Steve Marquez
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.


RE: [PHP] not null

2001-08-08 Thread Slavomir Slizik

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 wants there to be nothing in $value.
>
> Are you referring to the (INT, NOT NULL, PRIMARY) field being in a database?
>
> Sincerely,
>
> Craig Vincent
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] not null

2001-08-01 Thread mike cullerton

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 == ???)
> {
> bla
> bla
> bla 
> }
> 
> 
> My condition wants there to be nothing in $value.


 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] not null

2001-08-01 Thread Craig Vincent


> 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 NULL, PRIMARY) field being in a database?

Sincerely,

Craig Vincent


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] not null

2001-08-01 Thread Jeremy Morano

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 List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]