php-windows Digest 12 Nov 2004 16:56:16 -0000 Issue 2466

Topics (messages 24969 through 24973):

Re: Question concerning SWITCH and Comparisons
        24969 by: Alejandro C�sar Garrammone
        24970 by: Tony Devlin

simple database question
        24971 by: Patrick Roane
        24973 by: Alejandro C�sar Garrammone

Re: Apache
        24972 by: phpWalter

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I think this may work...but doing some debbuging I suggest:
case ($qty>=1600 and $qty< 2400): //$qty is less than 2400
and I modified the semi-colon of this part of code:
case ($qty >= 2400): //$qty is greater than or equal to 2400

I tried your code and It works!

Hope this helps,

Alex
----- Original Message ----- 
From: "Tony Devlin" <[EMAIL PROTECTED]>
To: "Php-Windows" <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 2:35 PM
Subject: [PHP-WIN] Question concerning SWITCH and Comparisons


> If my understanding of SWITCH is correct, it stops at the first case
> that
> matches the result, correct?
> 
> So then.. If I have a switch as such;
> 
> switch($qty){
> 
> case ($qty < 1600): //$qty is less than 1600
>   do something
> break;
> 
> case ($qty < 2400): //$qty is less than 2400
>   do something
> break;
> 
> case ($qty >= 2400); //$qty is greater than or equal to 2400
>   do something
> break;
> 
> default:
>  do something
> break;
> }
> 
> Then assuming $qty = 800, it should stop at the first case? right?
> 
> a $qty of 1601 should stop at the second case?
> 
> and a qty of greater than or equal to 2400 should stop at the last case?
> 
> Am I correct with my switch statement then?
> 
> My desired result is;
> 
> If quantity is less than 1600 set price = whatever;
> or if quantity is equal to 1600 and less than 2400 set price = whatever,
> or finally if quantity is equal to or greater than 2400 set price =
> whatever.
> 
> I'm having difficulties for whatever reason to come up with a proper
> comparison
> for the switch to work as described.  Can someone help me iron out this
> small problem?
> 
> 
> Much thanks for the help,
> 
> Tony D.
> 

--- End Message ---
--- Begin Message ---
I wanna thank everyone for helping me.  It seems I had it right was only
conceptually making it more
complex than it needed to be.  BTW the code I wrote down I did as an example
here, not one that I
actually wrote and tested -- I was trying to conceptually design the switch
statement before I began
coding to make sure that what I was thinking was correct.  After trying to
think too indept and not
coming up with my own definitive answer I decide to post my thoughts and ask
suggestion here.

I greatly appreciate the community and it's support.

Thanks,

Tony D.

-----Original Message-----
From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 2:55 PM
To: [EMAIL PROTECTED]; Php-Windows
Subject: Re: [PHP-WIN] Question concerning SWITCH and Comparisons


I think this may work...but doing some debbuging I suggest:
case ($qty>=1600 and $qty< 2400): //$qty is less than 2400
and I modified the semi-colon of this part of code:
case ($qty >= 2400): //$qty is greater than or equal to 2400

I tried your code and It works!

Hope this helps,

Alex
----- Original Message -----
From: "Tony Devlin" <[EMAIL PROTECTED]>
To: "Php-Windows" <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 2:35 PM
Subject: [PHP-WIN] Question concerning SWITCH and Comparisons


> If my understanding of SWITCH is correct, it stops at the first case
> that
> matches the result, correct?
>
> So then.. If I have a switch as such;
>
> switch($qty){
>
> case ($qty < 1600): //$qty is less than 1600
>   do something
> break;
>
> case ($qty < 2400): //$qty is less than 2400
>   do something
> break;
>
> case ($qty >= 2400); //$qty is greater than or equal to 2400
>   do something
> break;
>
> default:
>  do something
> break;
> }
>
> Then assuming $qty = 800, it should stop at the first case? right?
>
> a $qty of 1601 should stop at the second case?
>
> and a qty of greater than or equal to 2400 should stop at the last case?
>
> Am I correct with my switch statement then?
>
> My desired result is;
>
> If quantity is less than 1600 set price = whatever;
> or if quantity is equal to 1600 and less than 2400 set price = whatever,
> or finally if quantity is equal to or greater than 2400 set price =
> whatever.
>
> I'm having difficulties for whatever reason to come up with a proper
> comparison
> for the switch to work as described.  Can someone help me iron out this
> small problem?
>
>
> Much thanks for the help,
>
> Tony D.
>

--- End Message ---
--- Begin Message ---
I'm using the basic MySQL.exe console and I'm creating
a simple database for practice purposes. I've made
some errors. Do I have to start all over again? Or, is
there a way to back in the code and re-write just the
part that I goofed. 


Thanks-



=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. 
You can do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard

--- End Message ---
--- Begin Message ---
You're creating o modifiying a database or the "code" you mention is php?
Do you do some errors in what exactly?
----- Original Message ----- 
From: "Patrick Roane" <[EMAIL PROTECTED]>
To: "Php-Windows" <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 6:21 PM
Subject: [PHP-WIN] simple database question


> I'm using the basic MySQL.exe console and I'm creating
> a simple database for practice purposes. I've made
> some errors. Do I have to start all over again? Or, is
> there a way to back in the code and re-write just the
> part that I goofed.
>
>
> Thanks-
>
>
>
> =====
>
> ----------------
> "forget your lust for the rich man's gold. All that you need, is in your
soul. You can do this if you try. All that I want for you my son, is to be
satisfied"
>
>   ~ Lynard Skynard
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
> Dear All,
>
> When I add 'LoadModule php4_module C:/PHP/sapi/php4apache2.dll' to my
> Apache httpd.conf it does not want to start-up in XP. When I run it
> without it it starts up. Do I need this to execute php?
>
> Apache 2.0.5
> PHP4

My httpd.conf says...

(actually, it's in my php.conf file, that is INCLUDED into my httpd.conf
file)

php.conf:
   # Win 32 settings
   LoadFile "/etc/php/php4ts.dll"
   LoadFile "/etc/php/extensions/gnu_gettext.dll"

   LoadModule php4_module "/etc/php/sapi/php4apache2.dll"

   # Generic settings
   Action application/x-httpd-php "/etc/php/php.exe"

   ScriptAlias /php/ "/etc/php/"

   AddType application/x-httpd-php .php .phtml
   AddType application/x-httpd-php-source .phps

BTW: Yes, I'm on Windows, 2k3 server in fact.
     No, Volume letters are NOT needed, if everything
         lives on the same volume.
     Yes, this is the EXACT copy on my PC and on my Linux.
     OK, OK, linux has...
         # Linux setting
         LoadModule php4_module modules/libphp4.so
     The proper line is commented out on the proper system.

Since yours and mine (in essence) match, maybe your DLL is corrupt.

Try pulling out another and try again.

Walter

PS: If you have to do dev on both Windows and Linux, check out my
    install Windows process to make your life easier.

      http://web.torres.ws/walters_way

--- End Message ---

Reply via email to