I tried that.

same result.

Here is my (new) snippet:

  if($row['plevel'] == 0){
  echo 'No';
  } else {
  echo 'Yes';
  }

"Cal Evans" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> because $row['plevel'] is NEVER == '0'  It is probably == 0 though. (note
> the missing quotes. ) :)
>
> HTH,
> =C=
> *
> * Cal Evans
> * The Virtual CIO
> * http://www.calevans.com
> *
>
>
> -----Original Message-----
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 12, 2002 11:01 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How come this will echo No or nothing?
>
>
> here is the portion of the script:
>
>   if($row['plevel'] == '0'){
>   echo 'No';
>   } else {
>   echo 'Yes';
>   }
>
> here is my table structure dump:
>
> #
> # Table structure for table `docs`
> #
>
> CREATE TABLE docs (
>   id int(11) unsigned NOT NULL auto_increment,
>   name varchar(200) NOT NULL default '',
>   note varchar(200) NOT NULL default '',
>   author varchar(200) NOT NULL default '',
>   path varchar(200) NOT NULL default '',
>   plevel tinyint(3) NOT NULL default '0',
>   type char(3) NOT NULL default '',
>   cat tinyint(3) NOT NULL default '0',
>   file_size int(11) unsigned NOT NULL default '0',
>   date int(11) unsigned NOT NULL default '0',
>   PRIMARY KEY  (id)
> ) TYPE=MyISAM;
>
> the row plevel is either 0 or 1.
>
> why won't this script echo Yes?
>
> The reason that the plevel is set in numbers is because I may add higher
> ones later.
>
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
>
>
>
> --
> 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

Reply via email to