[PHP] Inheritance

2002-07-12 Thread Jason White

I have a class Foo{} which has a method Print().
I have another class FooBar{} which extends Foo{} and has its own method
Print().

How do I invoke Foo{}'s Print() method from within FooBar{} once its been
overridden?

Jason White




Re: [PHP] is_null question

2002-07-12 Thread Jason White

You can use:

if($row[1]){print "Email:$row[1]";}else{print " ";}

Jason White

- Original Message -
From: "Matthew K. Gold" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 9:23 PM
Subject: [PHP] is_null question


> Hi Everyone,
>
> Here's my problem:  I'd like to make the printing of some text dependent
on
> whether or not a variable is null.  In the following example, when $row[1]
> is null, what gets printed on the page is "Email: ".  I'd like the
> script to not print "Email:" if row[1] is null.
>
> It looks like I should be using is_null(), but I'm not sure how to use it,
> especially since all of this is embedded in a print statement.
>
> while ($row = mysql_fetch_row ($result))
> {
>  print ("\t\n\t\t$row[0]\n\n\t class=\"default\" bgcolor=\"#ff\">\n\t\t$row[10]Email:
 href=\"mailto:$row[1]\";>$row[1]Phone: $row[2]\n\nAddress:
> $row[3]$row[4]$row[5] $row[6] $row[7] URL:  href=\"$row[8]\" target=\"_blank\">$row[8]");
> }
>
>
> Instead of just printing Email: $row[1], I'd like to test whether it's
null
> first--maybe something like this?
>
> if (is_null($row[1])) print " " else print ("Email: $row[0]")
>
> but can I put that line inside of another print statement?  if so, do I
have
> to escape the quotation marks?  Please forgive my confusion--I'm new to
> programming in general and PHP in particular.
>
> Thanks in advance for your help.
>
> best,
>
> Matt
>
>
> --
> 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




Re: [PHP] is_null question

2002-07-12 Thread Jason White

My appologies, I didn't read clear through, your code block confused me :-)

What I usually do in a situation like this, although I'm new to PHP is.

$temp="Some stuff before Email";
if($row[1]){
$temp .= "Email:$row[1]";
}
$temp .= "The rest of the stuff after Email";
print $temp;

Jason White

----- Original Message -
From: "Jason White" <[EMAIL PROTECTED]>
To: "Matthew K. Gold" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 9:28 PM
Subject: Re: [PHP] is_null question


> You can use:
>
> if($row[1]){print "Email:$row[1]";}else{print " ";}
>
> Jason White
>
> - Original Message -
> From: "Matthew K. Gold" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 12, 2002 9:23 PM
> Subject: [PHP] is_null question
>
>
> > Hi Everyone,
> >
> > Here's my problem:  I'd like to make the printing of some text dependent
> on
> > whether or not a variable is null.  In the following example, when
$row[1]
> > is null, what gets printed on the page is "Email: ".  I'd like the
> > script to not print "Email:" if row[1] is null.
> >
> > It looks like I should be using is_null(), but I'm not sure how to use
it,
> > especially since all of this is embedded in a print statement.
> >
> > while ($row = mysql_fetch_row ($result))
> > {
> >  print ("\t\n\t\t$row[0]\n\n\t > class=\"default\" bgcolor=\"#ff\">\n\t\t$row[10]Email:
>  > href=\"mailto:$row[1]\";>$row[1]Phone:
$row[2]\n\nAddress:
> > $row[3]$row[4]$row[5] $row[6] $row[7] URL:  > href=\"$row[8]\" target=\"_blank\">$row[8]");
> > }
> >
> >
> > Instead of just printing Email: $row[1], I'd like to test whether it's
> null
> > first--maybe something like this?
> >
> > if (is_null($row[1])) print " " else print ("Email: $row[0]")
> >
> > but can I put that line inside of another print statement?  if so, do I
> have
> > to escape the quotation marks?  Please forgive my confusion--I'm new to
> > programming in general and PHP in particular.
> >
> > Thanks in advance for your help.
> >
> > best,
> >
> > Matt
> >
> >
> > --
> > 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
>
>


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




Re: [PHP] Convert MySQL table into Access or Excell format

2002-07-12 Thread Jason White

You can also use ODBC (Ships with Acess) to make a DSN connection to MySQL.
Access can retrieve data from any ODBC DSN.

Jason White

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 9:48 PM
Subject: Re: [PHP] Convert MySQL table into Access or Excell format


> On Saturday 13 July 2002 06:48, Alex Shi wrote:
> > Hello,
> >
> > My client has a website and it support MySQL/PHP. The client want
> > to download the MySQL tables and then access them in Excell or
> > Access. So my question is, is it possible to convert MySQL table into
> > Access or Excell format? Thanks in advance for all answer!
>
> archives -> "mysql excel"
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> After years of research, scientists recently reported that there is,
> indeed, arroz in Spanish Harlem.
> */
>
>
> --
> 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