Re: [PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread markbm

When I added this code, and removed all the images from the database...that
I wanted to check to see if their  would display...it worked correctly
(but the same thing had been happening while using the other 5 methods).
When I then added back all of the images that I wanted to display.the
page did not show thembasically, it displayed the same exact page as
before and did not seem to notice that there were now images that should be
shown.  I did do a commit on the database before testing.

Thanks for your help.

Mark

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tuesday 23 July 2002 11:58, markbm wrote:
> > I am trying to develop a page that, in certain places, I only want it to
> > display the  and s if data is found for a given field.  For
> > example, if I only have an image for the  first floorplan of a house, I
do
> > NOT have an image for the  second floorplan of a house, then show the
first
> > floorplan image only.skip over that next row because the field in
the
> > db is empty.
> >
> > The problem that I'm having is that the syntax that I've been using to
> > define "empty" in the db field does not always work.  The code reads:
> >
> > if ($result[FLRPLAN_2]<>" ")  {
>
> Try:
>
>   if (!empty($result['FLRPLAN_2']))  {
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
>
> /*
> Reading is to the mind what exercise is to the body.
> */
>



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




Re: [PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread Jason Wong

On Tuesday 23 July 2002 11:58, markbm wrote:
> I am trying to develop a page that, in certain places, I only want it to
> display the  and s if data is found for a given field.  For
> example, if I only have an image for the  first floorplan of a house, I do
> NOT have an image for the  second floorplan of a house, then show the first
> floorplan image only.skip over that next row because the field in the
> db is empty.
>
> The problem that I'm having is that the syntax that I've been using to
> define "empty" in the db field does not always work.  The code reads:
>
> if ($result[FLRPLAN_2]<>" ")  {

Try:

  if (!empty($result['FLRPLAN_2']))  {


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Reading is to the mind what exercise is to the body.
*/


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




[PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread markbm

I am trying to develop a page that, in certain places, I only want it to
display the  and s if data is found for a given field.  For example,
if I only have an image for the  first floorplan of a house, I do NOT have
an image for the  second floorplan of a house, then show the first floorplan
image only.skip over that next row because the field in the db is empty.

The problem that I'm having is that the syntax that I've been using to
define "empty" in the db field does not always work.  The code reads:

if ($result[FLRPLAN_2]<>" ")  {
   printf ("");
 printf ("");
 printf (" Second Floor Plan:
")  ;

  printf ("") ;
 printf ("");
 printf ("") ;
 echo "'";
 printf (" ") ;
  printf (" ");
};



if ($result[FLRPLAN_3]<>" ")  {;
  printf ("");
printf ("
Third Floor Plan: ");
printf ("   ");
 printf ("  ");
 printf ("   ");
printf ("");
  echo "'";
printf ("  ");
 printf ("  ");
 };


I have tried:

1.  if ($result[FLRPLAN_3]<>" ")  {;
2.  if ($result[FLRPLAN_3]<>"")  {;
3.  if ($result[FLRPLAN_3]<>'')  {;
4.  if ($result[FLRPLAN_3]<>' ')  {;
5.  if ($result[FLRPLAN_3]<>NULL)  {;

and none seem to work correctly (i.e. blank field in db, but HTML row shows
up with missing image..or image is in db, but no HTML row shows up.  If
it helps, each of the "image" fields are varchar(125)basically I just
have the name of the image file, and then a pointer to the web server
directory structure

Any ideas would be greatly appreciated.  Thanks.

Mark



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