Re: [PHP] thread question

2009-04-01 Thread Virgilio Quilario
>>> Hi all,
>>>
>>> Another question:
>>>
>>> If a script starts to perform an operation and the user browses away will
>>> that terminate the thread perfoming the operation eg. the operation is
>>> aborted ?
>>>
>>> Mvh
>>> Toke
>>
>> the script is aborted as soon as server gets no response from the
>> browser when it sent output to the browser.
>>
>> virgil
>> http://www.jampmark.com
>
> Hi virgil,
>
> would that also apply to a script executed from the first script :
>
> example:
>
> if (do_stuff_which_takes_a_long_time){
>  exec('php /path_toscript/script.phpsh');
> }
>
> would script.phpsh also be aborted if the connection is broken ?
>
> Regards,
> Toke

when exec starts running commands, php will wait until it ends.

virgil
http://www.jampmark.com

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



Re: [PHP] thread question

2009-04-01 Thread Ashley Sheridan
On Wed, 2009-04-01 at 19:41 +0800, Virgilio Quilario wrote:
> >>> Hi all,
> >>>
> >>> Another question:
> >>>
> >>> If a script starts to perform an operation and the user browses away will
> >>> that terminate the thread perfoming the operation eg. the operation is
> >>> aborted ?
> >>>
> >>> Mvh
> >>> Toke
> >>
> >> the script is aborted as soon as server gets no response from the
> >> browser when it sent output to the browser.
> >>
> >> virgil
> >> http://www.jampmark.com
> >
> > Hi virgil,
> >
> > would that also apply to a script executed from the first script :
> >
> > example:
> >
> > if (do_stuff_which_takes_a_long_time){
> >  exec('php /path_toscript/script.phpsh');
> > }
> >
> > would script.phpsh also be aborted if the connection is broken ?
> >
> > Regards,
> > Toke
> 
> when exec starts running commands, php will wait until it ends.
> 
> virgil
> http://www.jampmark.com
> 
Unless you ask exec to run in the background...


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] thread question

2009-04-01 Thread Toke Herkild

Ashley Sheridan skrev:

On Wed, 2009-04-01 at 19:41 +0800, Virgilio Quilario wrote:

Hi all,

Another question:

If a script starts to perform an operation and the user browses away will
that terminate the thread perfoming the operation eg. the operation is
aborted ?

Mvh
Toke

the script is aborted as soon as server gets no response from the
browser when it sent output to the browser.

virgil
http://www.jampmark.com

Hi virgil,

would that also apply to a script executed from the first script :

example:

if (do_stuff_which_takes_a_long_time){
 exec('php /path_toscript/script.phpsh');
}

would script.phpsh also be aborted if the connection is broken ?

Regards,
Toke

when exec starts running commands, php will wait until it ends.

virgil
http://www.jampmark.com


Unless you ask exec to run in the background...


Ash
www.ashleysheridan.co.uk



Hi Ash & vigil,

Thanks, I've found my solution to this problem then.
adding the function to an external script, and run it through exec.

Regards,
Toke

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



Re: [PHP] Workflow app for software

2009-04-01 Thread haliphax
On Tue, Mar 31, 2009 at 4:37 PM, bruce  wrote:
> hey todd...
>
> just toook a look at the polarion svn-web app i thought that was closed 
> source... i see that it's open!!!
>
> -Original Message-
> From: haliphax [mailto:halip...@gmail.com]
> Sent: Tuesday, March 31, 2009 2:18 PM
> To: bruce; php-general@lists.php.net
> Subject: Re: [PHP] Workflow app for software
>
>
> On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
>> Ladies/Gents...
>>
>> Hi. Trying to get some input to a web based app for dealing with managing
>> software apps/scripts.
>>
>> Basically, i'm envisioning a system where people register/signup, and then
>> check in/out apps for development/testing/production... I need a way of
>> dealing with users, assigning/accepting roles for the users, and to manage
>> the flow of the "file" as it moves through the basic
>> "development/testing/production" process. i'd like to have a database
>> backend, combines with some kind of source/file reqpository...
>>
>> I've seen things like knowledgetree, owl, etc... but figured I'd get input
>> from here. So, any thoughts to open source apps that you guys have actual
>> experience using??
>
> This sounds like something Subversion (SVN) is suited for. Three
> repositories in the same realm: dev, test, prod. Slap a web front-end
> on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
> business.

Well, whether it's open source or not, the software is free to use...
that's all I ever really cared about. :)
(Please stop top-posting.)


-- 
// Todd

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



[PHP] stream_socket_client with tls: problem in Solaris 8

2009-04-01 Thread Laura Longo
Hi all,
I've a problem with stream_socket_client function and tls under Solaris
8 (sparc).

The client code follows up:
array('capture_peer_cert'=>TRUE)));
$fp = stream_socket_client("tls://192.168.14.200:8000", $errno, $errstr,
30, STREAM_CLIENT_CONNECT, $context);
if (!$fp) {
echo "$errstr ($errno)\n";
die("error creating socket ({$errno}):{$errstr}\n");
}
echo "Socket is ok, start sending messages!\n";
$i_sleep = 5;
for ($i_counter = 0; $i_counter < 10; $i_counter++) {
$s_msg = "message sent ".$i_counter;
fwrite($fp,$s_msg);
sleep($i_sleep);
}
fclose($fp);
?> 

This code works fine on CentOS 5 (x86_64) and Solars 10 (x86) [the
client connects to the server and sends messages], but on Solars 8
(sparc, core installation) it gives a warning and does not create any
connection, the connection error is 0 (unknown error).

Warning: stream_socket_client(): SSL: Error 0 in test.php on line 2

Warning: stream_socket_client(): Failed to enable crypto in test.php on
line 2

Warning: stream_socket_client(): unable to connect to
tls://192.168.14.200:8000 (Unknown error) in test.php on line 2
 (0)


php has been compiled without problems with the options:
./configure \
--enable-xml \
--enable-libxml \
--with-tsrm-pthreads \
--with-openssl \
--with-zlib \
--with-pcre-regex \
--with-pear \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-pcntl \
--with-gettext \
--enable-sockets \
--enable-mbstring \
--with-imap-ssl \
--with-mcrypt \
--disable-cgi \
--with-gnu-ld


Any help would be appriciated,
thanks,
Laura


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



[PHP] Error on .htaccess

2009-04-01 Thread Igor Escobar
In all the servers i had tested my system i dont have any problem, but in
this server the apache are displaying to me the error 500 "Internal Server
Error".

Someone can say tome what is wront with my .htaccess?

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !-d
RewriteRule ^(.*)$ load.php?$1 [QSA,L]


This server are running PHP 5.2.9 and Apache 1.3.41 (Unix).

Regards,
Igor Escobar
systems analyst & interface designer
www . igorescobar . com


Re: [PHP] Error on .htaccess

2009-04-01 Thread Daniel Brown
On Wed, Apr 1, 2009 at 10:39, Igor Escobar  wrote:
> In all the servers i had tested my system i dont have any problem, but in
> this server the apache are displaying to me the error 500 "Internal Server
> Error".
>
> Someone can say tome what is wront with my .htaccess?

This is a question for the Apache list, Igor, it has nothing to do
with PHP in this particular case.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

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



Re: [PHP] Error on .htaccess

2009-04-01 Thread Virgilio Quilario
> In all the servers i had tested my system i dont have any problem, but in
> this server the apache are displaying to me the error 500 "Internal Server
> Error".
>
> Someone can say tome what is wront with my .htaccess?
>
> RewriteEngine On
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond $1 !-d
> RewriteRule ^(.*)$ load.php?$1 [QSA,L]
> 
>
> This server are running PHP 5.2.9 and Apache 1.3.41 (Unix).
>
> Regards,
> Igor Escobar
> systems analyst & interface designer
> www . igorescobar . com
>

hi Igor,

try this and make sure load.php exist in your root web folder.


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !-d
RewriteRule ^(.*)$ /load.php?$1 [QSA,L]


not sure what you are trying to achieve with this line
RewriteRule ^(.*)$ /load.php?$1 [QSA,L]

i you mean to pass the query string, replace $1 with %{QUERY_STRING}

good luck

virgil
http://www.jampmark.com

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



Re: [PHP] Workflow app for software

2009-04-01 Thread haliphax
On Wed, Apr 1, 2009 at 8:33 AM, bruce  wrote:
> not another top/side/bottom post thread again!!!
>
>
>
> -Original Message-
> From: haliphax [mailto:halip...@gmail.com]
> Sent: Wednesday, April 01, 2009 5:38 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Workflow app for software
>
>
> On Tue, Mar 31, 2009 at 4:37 PM, bruce  wrote:
>> hey todd...
>>
>> just toook a look at the polarion svn-web app i thought that was closed 
>> source... i see that it's open!!!
>>
>> -Original Message-
>> From: haliphax [mailto:halip...@gmail.com]
>> Sent: Tuesday, March 31, 2009 2:18 PM
>> To: bruce; php-general@lists.php.net
>> Subject: Re: [PHP] Workflow app for software
>>
>>
>> On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
>>> Ladies/Gents...
>>>
>>> Hi. Trying to get some input to a web based app for dealing with managing
>>> software apps/scripts.
>>>
>>> Basically, i'm envisioning a system where people register/signup, and then
>>> check in/out apps for development/testing/production... I need a way of
>>> dealing with users, assigning/accepting roles for the users, and to manage
>>> the flow of the "file" as it moves through the basic
>>> "development/testing/production" process. i'd like to have a database
>>> backend, combines with some kind of source/file reqpository...
>>>
>>> I've seen things like knowledgetree, owl, etc... but figured I'd get input
>>> from here. So, any thoughts to open source apps that you guys have actual
>>> experience using??
>>
>> This sounds like something Subversion (SVN) is suited for. Three
>> repositories in the same realm: dev, test, prod. Slap a web front-end
>> on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
>> business.
>
> Well, whether it's open source or not, the software is free to use...
> that's all I ever really cared about. :)
> (Please stop top-posting.)

Again, please do not top-post. It is the agreed-upon procedure in this
list to bottom-post when replying to threads. (I am not just going
"renegade thread-Nazi" on you.)


-- 
// Todd

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



Re: [PHP] Workflow app for software

2009-04-01 Thread Robert Cummings
On Wed, 2009-04-01 at 11:25 -0500, haliphax wrote:
> On Wed, Apr 1, 2009 at 8:33 AM, bruce  wrote:
> > not another top/side/bottom post thread again!!!
> >
> >
> >
> > -Original Message-
> > From: haliphax [mailto:halip...@gmail.com]
> > Sent: Wednesday, April 01, 2009 5:38 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] Workflow app for software
> >
> >
> > On Tue, Mar 31, 2009 at 4:37 PM, bruce  wrote:
> >> hey todd...
> >>
> >> just toook a look at the polarion svn-web app i thought that was 
> >> closed source... i see that it's open!!!
> >>
> >> -Original Message-
> >> From: haliphax [mailto:halip...@gmail.com]
> >> Sent: Tuesday, March 31, 2009 2:18 PM
> >> To: bruce; php-general@lists.php.net
> >> Subject: Re: [PHP] Workflow app for software
> >>
> >>
> >> On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
> >>> Ladies/Gents...
> >>>
> >>> Hi. Trying to get some input to a web based app for dealing with managing
> >>> software apps/scripts.
> >>>
> >>> Basically, i'm envisioning a system where people register/signup, and then
> >>> check in/out apps for development/testing/production... I need a way of
> >>> dealing with users, assigning/accepting roles for the users, and to manage
> >>> the flow of the "file" as it moves through the basic
> >>> "development/testing/production" process. i'd like to have a database
> >>> backend, combines with some kind of source/file reqpository...
> >>>
> >>> I've seen things like knowledgetree, owl, etc... but figured I'd get input
> >>> from here. So, any thoughts to open source apps that you guys have actual
> >>> experience using??
> >>
> >> This sounds like something Subversion (SVN) is suited for. Three
> >> repositories in the same realm: dev, test, prod. Slap a web front-end
> >> on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
> >> business.
> >
> > Well, whether it's open source or not, the software is free to use...
> > that's all I ever really cared about. :)
> > (Please stop top-posting.)
> 
> Again, please do not top-post. It is the agreed-upon procedure in this
> list to bottom-post when replying to threads. (I am not just going
> "renegade thread-Nazi" on you.)

Could you show me the signed agreement list. While it's convention on
this list, it's certainly not something everyone agreed upon.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



[PHP] & and && and weird results

2009-04-01 Thread PJ
I hope somebody can make sense of this.
First, I don't understand what the difference is supposed to be between
& and && - is there a difference for php and/or mysql?
Second, I am trying to select all occurrences in a table.column where
the first letter of the name is I, J, or K but not I or J or K; I want
the all. Now, entering the following is no problem for any one letter:
SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author
WHERE LEFT(last_name, 1 ) = '$Auth' ));

But the following does not work:

SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));

Yet this gives off the wall results where the last names are nowhere
near what they should be.
Anyone have a rational explanation?

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] & and && and weird results

2009-04-01 Thread Kyle Smith

PJ wrote:

I hope somebody can make sense of this.
First, I don't understand what the difference is supposed to be between
& and && - is there a difference for php and/or mysql?
Second, I am trying to select all occurrences in a table.column where
the first letter of the name is I, J, or K but not I or J or K; I want
the all. Now, entering the following is no problem for any one letter:
SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author
WHERE LEFT(last_name, 1 ) = '$Auth' ));

But the following does not work:

SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));

Yet this gives off the wall results where the last names are nowhere
near what they should be.
Anyone have a rational explanation?

  
I wasn't aware that && was an option in MySQL, I've always used "AND".  
If there is a difference it's probably the same as in PHP and many other 
languages.  Allow me to explain.


In the case of & the left-side expression is evaluated for true and if 
not true, the right side expression is not evaluated.  In the case of && 
both sides are evaluated regardless of the value of either side.  Here's 
an example:


$a = 1;
$b = 2;

$result = ($a == 2) && $b++; 
//  In this case, $a does not equal two and therefor the left-side is 
false, thus the right-side is never evaluated.  $b remains 2.


$result = ($a == 2) & $b++;
//  In this case, $a still does not equal two and therefor the left-side 
is still false, however because we use the '&' operator the right side 
is evaluated anyway and $b now equals 3.


echo $result;
//  In both cases, $result is false.

HTH,
Kyle


--
*Kyle Smith*
UNIX/Linux Systems Administrator
Inforonics, LLC



Re: [PHP] & and && and weird results

2009-04-01 Thread Kyle Smith

Kyle Smith wrote:

PJ wrote:

I hope somebody can make sense of this.
First, I don't understand what the difference is supposed to be between
& and && - is there a difference for php and/or mysql?
Second, I am trying to select all occurrences in a table.column where
the first letter of the name is I, J, or K but not I or J or K; I want
the all. Now, entering the following is no problem for any one letter:
SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author
WHERE LEFT(last_name, 1 ) = '$Auth' ));

But the following does not work:

SELECT * FROM book
WHERE id IN (SELECT bookID
FROM book_author WHERE authID IN (SELECT author.id
FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));

Yet this gives off the wall results where the last names are nowhere
near what they should be.
Anyone have a rational explanation?

  
I wasn't aware that && was an option in MySQL, I've always used 
"AND".  If there is a difference it's probably the same as in PHP and 
many other languages.  Allow me to explain.


In the case of & the left-side expression is evaluated for true and if 
not true, the right side expression is not evaluated.  In the case of 
&& both sides are evaluated regardless of the value of either side.  
Here's an example:


$a = 1;
$b = 2;

$result = ($a == 2) && $b++; //  In this case, $a does not equal two 
and therefor the left-side is false, thus the right-side is never 
evaluated.  $b remains 2.


$result = ($a == 2) & $b++;
//  In this case, $a still does not equal two and therefor the 
left-side is still false, however because we use the '&' operator the 
right side is evaluated anyway and $b now equals 3.


echo $result;
//  In both cases, $result is false.

HTH,
Kyle


Oops, my first paragraph is backwards.  I'm sure that was confusing!  My 
example is the correct logic for && and &, and the paragraph before that 
is exactly wrong.


--
*Kyle Smith*
UNIX/Linux Systems Administrator
Inforonics, LLC



RE: [PHP] Workflow app for software

2009-04-01 Thread bruce
and haliphax...

i specifically sent the reply to only you.. you then felt the need to reply
to the list as a whole

hmm.. ok.. this thread is officially dead!!

unless of course it gets back to the initial question...

peace!!


-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Wednesday, April 01, 2009 9:30 AM
To: haliphax
Cc: php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


On Wed, 2009-04-01 at 11:25 -0500, haliphax wrote:
> On Wed, Apr 1, 2009 at 8:33 AM, bruce  wrote:
> > not another top/side/bottom post thread again!!!
> >
> >
> >
> > -Original Message-
> > From: haliphax [mailto:halip...@gmail.com]
> > Sent: Wednesday, April 01, 2009 5:38 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] Workflow app for software
> >
> >
> > On Tue, Mar 31, 2009 at 4:37 PM, bruce  wrote:
> >> hey todd...
> >>
> >> just toook a look at the polarion svn-web app i thought that was
closed source... i see that it's open!!!
> >>
> >> -Original Message-
> >> From: haliphax [mailto:halip...@gmail.com]
> >> Sent: Tuesday, March 31, 2009 2:18 PM
> >> To: bruce; php-general@lists.php.net
> >> Subject: Re: [PHP] Workflow app for software
> >>
> >>
> >> On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
> >>> Ladies/Gents...
> >>>
> >>> Hi. Trying to get some input to a web based app for dealing with
managing
> >>> software apps/scripts.
> >>>
> >>> Basically, i'm envisioning a system where people register/signup, and
then
> >>> check in/out apps for development/testing/production... I need a way
of
> >>> dealing with users, assigning/accepting roles for the users, and to
manage
> >>> the flow of the "file" as it moves through the basic
> >>> "development/testing/production" process. i'd like to have a database
> >>> backend, combines with some kind of source/file reqpository...
> >>>
> >>> I've seen things like knowledgetree, owl, etc... but figured I'd get
input
> >>> from here. So, any thoughts to open source apps that you guys have
actual
> >>> experience using??
> >>
> >> This sounds like something Subversion (SVN) is suited for. Three
> >> repositories in the same realm: dev, test, prod. Slap a web front-end
> >> on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
> >> business.
> >
> > Well, whether it's open source or not, the software is free to use...
> > that's all I ever really cared about. :)
> > (Please stop top-posting.)
>
> Again, please do not top-post. It is the agreed-upon procedure in this
> list to bottom-post when replying to threads. (I am not just going
> "renegade thread-Nazi" on you.)

Could you show me the signed agreement list. While it's convention on
this list, it's certainly not something everyone agreed upon.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for 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] & and && and weird results

2009-04-01 Thread PJ
Kyle Smith wrote:
> Kyle Smith wrote:
>> PJ wrote:
>>> I hope somebody can make sense of this.
>>> First, I don't understand what the difference is supposed to be between
>>> & and && - is there a difference for php and/or mysql?
>>> Second, I am trying to select all occurrences in a table.column where
>>> the first letter of the name is I, J, or K but not I or J or K; I want
>>> the all. Now, entering the following is no problem for any one letter:
>>> SELECT * FROM book
>>> WHERE id IN (SELECT bookID
>>> FROM book_author WHERE authID IN (SELECT author.id
>>> FROM author
>>> WHERE LEFT(last_name, 1 ) = '$Auth' ));
>>>
>>> But the following does not work:
>>>
>>> SELECT * FROM book
>>> WHERE id IN (SELECT bookID
>>> FROM book_author WHERE authID IN (SELECT author.id
>>> FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
>>> LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));
>>>
>>> Yet this gives off the wall results where the last names are nowhere
>>> near what they should be.
>>> Anyone have a rational explanation?
>>>
>>>   
>> I wasn't aware that && was an option in MySQL, I've always used
>> "AND".  If there is a difference it's probably the same as in PHP and
>> many other languages.  Allow me to explain.
>>
>> In the case of & the left-side expression is evaluated for true and
>> if not true, the right side expression is not evaluated.  In the case
>> of && both sides are evaluated regardless of the value of either
>> side.  Here's an example:
>>
>> $a = 1;
>> $b = 2;
>>
>> $result = ($a == 2) && $b++; //  In this case, $a does not equal two
>> and therefor the left-side is false, thus the right-side is never
>> evaluated.  $b remains 2.
>>
>> $result = ($a == 2) & $b++;
>> //  In this case, $a still does not equal two and therefor the
>> left-side is still false, however because we use the '&' operator the
>> right side is evaluated anyway and $b now equals 3.
>>
>> echo $result;
>> //  In both cases, $result is false.
>>
>> HTH,
>> Kyle
>>
>>
> Oops, my first paragraph is backwards.  I'm sure that was confusing! 
> My example is the correct logic for && and &, and the paragraph before
> that is exactly wrong.
>
Not really clear... I thought that $b+ would == 3 ; why two + ?

But this does not explain the weir results I am getting; and BTW, if I
use AND does not work either.
What am I supposed to use to get the results I am looking for?

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] & and && and weird results NOT solved but FIXED ....

2009-04-01 Thread PJ
PJ wrote:
> Kyle Smith wrote:
>   
>> Kyle Smith wrote:
>> 
>>> PJ wrote:
>>>   
 I hope somebody can make sense of this.
 First, I don't understand what the difference is supposed to be between
 & and && - is there a difference for php and/or mysql?
 Second, I am trying to select all occurrences in a table.column where
 the first letter of the name is I, J, or K but not I or J or K; I want
 the all. Now, entering the following is no problem for any one letter:
 SELECT * FROM book
 WHERE id IN (SELECT bookID
 FROM book_author WHERE authID IN (SELECT author.id
 FROM author
 WHERE LEFT(last_name, 1 ) = '$Auth' ));

 But the following does not work:

 SELECT * FROM book
 WHERE id IN (SELECT bookID
 FROM book_author WHERE authID IN (SELECT author.id
 FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
 LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));

 Yet this gives off the wall results where the last names are nowhere
 near what they should be.
 Anyone have a rational explanation?

   
 
>>> I wasn't aware that && was an option in MySQL, I've always used
>>> "AND".  If there is a difference it's probably the same as in PHP and
>>> many other languages.  Allow me to explain.
>>>
>>> In the case of & the left-side expression is evaluated for true and
>>> if not true, the right side expression is not evaluated.  In the case
>>> of && both sides are evaluated regardless of the value of either
>>> side.  Here's an example:
>>>
>>> $a = 1;
>>> $b = 2;
>>>
>>> $result = ($a == 2) && $b++; //  In this case, $a does not equal two
>>> and therefor the left-side is false, thus the right-side is never
>>> evaluated.  $b remains 2.
>>>
>>> $result = ($a == 2) & $b++;
>>> //  In this case, $a still does not equal two and therefor the
>>> left-side is still false, however because we use the '&' operator the
>>> right side is evaluated anyway and $b now equals 3.
>>>
>>> echo $result;
>>> //  In both cases, $result is false.
>>>
>>> HTH,
>>> Kyle
>>>
>>>
>>>   
>> Oops, my first paragraph is backwards.  I'm sure that was confusing! 
>> My example is the correct logic for && and &, and the paragraph before
>> that is exactly wrong.
>>
>> 
> Not really clear... I thought that $b+ would == 3 ; why two + ?
>
> But this does not explain the weir results I am getting; and BTW, if I
> use AND does not work either.
> What am I supposed to use to get the results I am looking for?
>
>   
I did fix it - it seems that OR does the trick.
But I sure would like to understand why & does not work?

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] & and && and weird results

2009-04-01 Thread Lex Braun
PJ,

On Wed, Apr 1, 2009 at 1:40 PM, PJ  wrote:

> SELECT * FROM book
>WHERE id IN (SELECT bookID
>FROM book_author WHERE authID IN (SELECT author.id
>FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
> LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));
>

Say $Auth = "I", $Auth1 = "J", $Auth2 = "K".
The above sub-query is stating select author ids where the first digit in
last_name is I AND the first digit in last_name is J AND the first digit in
last_name is K.  For any given last_name (thus, author id), the first digit
can only be one of those options, thus this sub-query will return ZERO
results.

To get a sub-query that will only return results that start with I, J,
or K,you can instead use the following sub-query:
SELECT author.id FROM author WHERE LEFT(last_name, 1) = '$Auth' OR
LEFT(last_name, 1) = '$Auth1' OR LEFT(last_name, 1) = '$Auth2'

The above will return all author IDs where the surname starts with I, J, or
K.

- Lex


Re: [PHP] Workflow app for software

2009-04-01 Thread haliphax
On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
> and haliphax...
>
> i specifically sent the reply to only you.. you then felt the need to reply
> to the list as a whole
>
> hmm.. ok.. this thread is officially dead!!
>
> unless of course it gets back to the initial question...
>
> peace!!
>
>
>> > -Original Message-
>> > From: haliphax [mailto:halip...@gmail.com]
>> > Sent: Wednesday, April 01, 2009 5:38 AM
>> > To: php-general@lists.php.net
>> > Subject: Re: [PHP] Workflow app for software

--8<--

>> Again, please do not top-post. It is the agreed-upon procedure in this
>> list to bottom-post when replying to threads. (I am not just going
>> "renegade thread-Nazi" on you.)
>
> Could you show me the signed agreement list. While it's convention on
> this list, it's certainly not something everyone agreed upon.

To Rob,
I meant agreed-upon as in: it's been written... so somebody had to
agree to it up to the point that it was posted here -
http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES

To Bruce,
I replied to the mailing list because this is a PHP-General thread,
and it is a general practice (though not a rule listed at the above
address) to keep replies on-list. I did not do it out of spite... I
did it out of habit; out of reflex. Perhaps this time I'm doing it out
of spite. :P

Regardless, I agree--this has nothing to do with the original topic.
Bearing that in mind, here's another link for an open source ticket
system written in PHP: http://www.zentrack.net/ (however, their demo
seems to be offline).


-- 
// Todd

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



Re: [PHP] Workflow app for software

2009-04-01 Thread Robert Cummings
On Wed, 2009-04-01 at 13:30 -0500, haliphax wrote:
> On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
> > and haliphax...
> >
> > i specifically sent the reply to only you.. you then felt the need to reply
> > to the list as a whole
> >
> > hmm.. ok.. this thread is officially dead!!
> >
> > unless of course it gets back to the initial question...
> >
> > peace!!
> >
> >
> >> > -Original Message-
> >> > From: haliphax [mailto:halip...@gmail.com]
> >> > Sent: Wednesday, April 01, 2009 5:38 AM
> >> > To: php-general@lists.php.net
> >> > Subject: Re: [PHP] Workflow app for software
> 
> --8<--
> 
> >> Again, please do not top-post. It is the agreed-upon procedure in this
> >> list to bottom-post when replying to threads. (I am not just going
> >> "renegade thread-Nazi" on you.)
> >
> > Could you show me the signed agreement list. While it's convention on
> > this list, it's certainly not something everyone agreed upon.
> 
> To Rob,
> I meant agreed-upon as in: it's been written... so somebody had to
> agree to it up to the point that it was posted here -
> http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES

"It has been written" and "it has been agreed upon" are two completely
different things. Many things have been written, few things are agreed
upon.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Workflow app for software

2009-04-01 Thread haliphax
On Wed, Apr 1, 2009 at 1:38 PM, Robert Cummings  wrote:
> On Wed, 2009-04-01 at 13:30 -0500, haliphax wrote:
>> On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
>> > and haliphax...
>> >
>> > i specifically sent the reply to only you.. you then felt the need to reply
>> > to the list as a whole
>> >
>> > hmm.. ok.. this thread is officially dead!!
>> >
>> > unless of course it gets back to the initial question...
>> >
>> > peace!!
>> >
>> >
>> >> > -Original Message-
>> >> > From: haliphax [mailto:halip...@gmail.com]
>> >> > Sent: Wednesday, April 01, 2009 5:38 AM
>> >> > To: php-general@lists.php.net
>> >> > Subject: Re: [PHP] Workflow app for software
>>
>> --8<--
>>
>> >> Again, please do not top-post. It is the agreed-upon procedure in this
>> >> list to bottom-post when replying to threads. (I am not just going
>> >> "renegade thread-Nazi" on you.)
>> >
>> > Could you show me the signed agreement list. While it's convention on
>> > this list, it's certainly not something everyone agreed upon.
>>
>> To Rob,
>> I meant agreed-upon as in: it's been written... so somebody had to
>> agree to it up to the point that it was posted here -
>> http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES
>
> "It has been written" and "it has been agreed upon" are two completely
> different things. Many things have been written, few things are agreed
> upon.

Unless the PHP development process has become a dictatorship, I'm
pretty sure more than one person decided it was a good idea before
putting it in the mailing list rules.


-- 
// Todd

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



RE: [PHP] Workflow app for software

2009-04-01 Thread bruce
so haliphax...

since you seem to be the primary person with this issue.. at least for now... 
i'll ahead and nominate you to the guy in charge of making sure posters follow 
the written rule to not top/down/side/left/right post...

have fun!!!



-Original Message-
From: haliphax [mailto:halip...@gmail.com]
Sent: Wednesday, April 01, 2009 11:42 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


On Wed, Apr 1, 2009 at 1:38 PM, Robert Cummings  wrote:
> On Wed, 2009-04-01 at 13:30 -0500, haliphax wrote:
>> On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
>> > and haliphax...
>> >
>> > i specifically sent the reply to only you.. you then felt the need to reply
>> > to the list as a whole
>> >
>> > hmm.. ok.. this thread is officially dead!!
>> >
>> > unless of course it gets back to the initial question...
>> >
>> > peace!!
>> >
>> >
>> >> > -Original Message-
>> >> > From: haliphax [mailto:halip...@gmail.com]
>> >> > Sent: Wednesday, April 01, 2009 5:38 AM
>> >> > To: php-general@lists.php.net
>> >> > Subject: Re: [PHP] Workflow app for software
>>
>> --8<--
>>
>> >> Again, please do not top-post. It is the agreed-upon procedure in this
>> >> list to bottom-post when replying to threads. (I am not just going
>> >> "renegade thread-Nazi" on you.)
>> >
>> > Could you show me the signed agreement list. While it's convention on
>> > this list, it's certainly not something everyone agreed upon.
>>
>> To Rob,
>> I meant agreed-upon as in: it's been written... so somebody had to
>> agree to it up to the point that it was posted here -
>> http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES
>
> "It has been written" and "it has been agreed upon" are two completely
> different things. Many things have been written, few things are agreed
> upon.

Unless the PHP development process has become a dictatorship, I'm
pretty sure more than one person decided it was a good idea before
putting it in the mailing list rules.


-- 
// Todd

-- 
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] Workflow app for software

2009-04-01 Thread Robert Cummings
On Wed, 2009-04-01 at 13:42 -0500, haliphax wrote:
> On Wed, Apr 1, 2009 at 1:38 PM, Robert Cummings  wrote:
> > On Wed, 2009-04-01 at 13:30 -0500, haliphax wrote:
> >> On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
> >> > and haliphax...
> >> >
> >> > i specifically sent the reply to only you.. you then felt the need to 
> >> > reply
> >> > to the list as a whole
> >> >
> >> > hmm.. ok.. this thread is officially dead!!
> >> >
> >> > unless of course it gets back to the initial question...
> >> >
> >> > peace!!
> >> >
> >> >
> >> >> > -Original Message-
> >> >> > From: haliphax [mailto:halip...@gmail.com]
> >> >> > Sent: Wednesday, April 01, 2009 5:38 AM
> >> >> > To: php-general@lists.php.net
> >> >> > Subject: Re: [PHP] Workflow app for software
> >>
> >> --8<--
> >>
> >> >> Again, please do not top-post. It is the agreed-upon procedure in this
> >> >> list to bottom-post when replying to threads. (I am not just going
> >> >> "renegade thread-Nazi" on you.)
> >> >
> >> > Could you show me the signed agreement list. While it's convention on
> >> > this list, it's certainly not something everyone agreed upon.
> >>
> >> To Rob,
> >> I meant agreed-upon as in: it's been written... so somebody had to
> >> agree to it up to the point that it was posted here -
> >> http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES
> >
> > "It has been written" and "it has been agreed upon" are two completely
> > different things. Many things have been written, few things are agreed
> > upon.
> 
> Unless the PHP development process has become a dictatorship, I'm
> pretty sure more than one person decided it was a good idea before
> putting it in the mailing list rules.

Shall we discuss temporal proximity and relevance?

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Workflow app for software

2009-04-01 Thread listmail
On Wed, 1 Apr 2009 11:46:20 -0700
"bruce"  wrote:

> so haliphax...
> 
> since you seem to be the primary person with this issue.. at least
> for now... i'll ahead and nominate you to the guy in charge of making
> sure posters follow the written rule to not top/down/side/left/right
> post...
> 
> have fun!!!
> 
> 

Please don't top post :)

GM

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



[PHP] extention question

2009-04-01 Thread MikeP
Hello,
How do I know if an extension (specifically php-domxml) has to be compiled 
or can just be loaded.
I am using RedHat Linux .
Thanks
Mike 



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



RE: [PHP] Workflow app for software

2009-04-01 Thread Robert Cummings
I for one don't find you very  | On Wed, 2009-04-01 at 11:46 -0700,
funny Bruce. It's common knowledge | bruce wrote: so haliphax...
that it's very difficult to follow | >
side posts. If not already, then   | > since you seem to be the primary
they should certainly be   | > person with this issue.. at
dictatorily banned from being used.| > least for now... i'll ahead and
   | > nominate you to the guy in
Cheers,| > charge of making sure posters
Rob.   | > follow the written rule to not
   | > top/down/side/left/right post...
   | >
   | > have fun!!!
   | >
   | >
   | >
   | > -Original Message- From:
   | > haliphax
   | > [mailto:halip...@gmail.com]
   | > Sent: Wednesday, April 01, 2009
   | > 11:42 AM To:
   | > php-general@lists.php.net
   | > Subject: Re: [PHP] Workflow app
   | > for software
   | >
   | >
   | > On Wed, Apr 1, 2009 at 1:38 PM,
   | > Robert Cummings
   | >  wrote:
   | > > On Wed, 2009-04-01 at 13:30
   | > >> -0500, haliphax wrote: On
   | > >> Wed, Apr 1, 2009 at 11:53
   | > >> > AM, bruce
   | > >> > 
   | > >> > wrote: and haliphax...
   | > >> >
   | > >> > i specifically sent the
   | > >> > reply to only you.. you
   | > >> > then felt the need to reply
   | > >> > to the list as a whole
   | > >> >
   | > >> > hmm.. ok.. this thread is
   | > >> > officially dead!!
   | > >> >
   | > >> > unless of course it gets
   | > >> > back to the initial
   | > >> > question...
   | > >> >
   | > >> > peace!!
   | > >> >
   | > >> >
   | > >> >> > -Original
   | > >> >> > Message- From:
   | > >> >> > haliphax
   | > >> >> > Sent: Wednesday, April
   | > >> >> > 01, 2009 5:38 AM To:
   | > >> >> > php-general@lists.php.net
   | > >> >> > Subject: Re: [PHP]
   | > >> >> > Workflow app for
   | > >> >> > software
   | > >>
   | > >> --8<--
   | > >>
   | > >> >> Again, please do not
   | > >> >> top-post. It is the
   | > >> >> agreed-upon procedure in
   | > >> >> this list to bottom-post
   | > >> >> when replying to threads.
   | > >> >> (I am not just going
   | > >> >> "renegade thread-Nazi" on
   | > >> >> you.)
   | > >> >
   | > >> > Could you show me the
   | > >> > signed agreement list.
   | > >> > While it's convention on
   | > >> > this list, it's certainly
   | > >> > not something everyone
   | > >> > agreed upon.
   | > >>
   | > >> To Rob, I meant agreed-upon
   | > >> as in: it's been written...
   | > >> so somebody had to agree to
   | > >> it up to the point that it
   | > >> was posted here -
 

Re: [PHP] extention question

2009-04-01 Thread Per Jessen
MikeP wrote:

> Hello,
> How do I know if an extension (specifically php-domxml) has to be
> compiled or can just be loaded.

To see if it has already been compiled, check /usr/lib/phpx/extensions

/Per


-- 
Per Jessen, Zürich (6.8°C)


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



Re: [PHP] extention question

2009-04-01 Thread Michael A. Peters

MikeP wrote:

Hello,
How do I know if an extension (specifically php-domxml) has to be compiled 
or can just be loaded.

I am using RedHat Linux .
Thanks
Mike 



I assume by Red Hat you mean RHEL ??

I believe domxml is part of the php-xml package

yum install php-xml

then

/etc/init.d/httpd restart

If you are looking as to whether or not you already have it - put this 
in a page:




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



Re: [PHP] Workflow app for software

2009-04-01 Thread George Larson
Please quit side-posting.  Thanks.

On Wed, Apr 1, 2009 at 2:58 PM, Robert Cummings wrote:

> I for one don't find you very  | On Wed, 2009-04-01 at 11:46 -0700,
> funny Bruce. It's common knowledge | bruce wrote: so haliphax...
> that it's very difficult to follow | >
> side posts. If not already, then   | > since you seem to be the primary
> they should certainly be   | > person with this issue.. at
> dictatorily banned from being used.| > least for now... i'll ahead and
>| > nominate you to the guy in
> Cheers,| > charge of making sure posters
> Rob.   | > follow the written rule to not
>| > top/down/side/left/right post...
>   | >
>   | > have fun!!!
>   | >
>   | >
>   | >
>   | > -Original Message- From:
>   | > haliphax
>   | > [mailto:halip...@gmail.com]
>   | > Sent: Wednesday, April 01, 2009
>   | > 11:42 AM To:
>   | > php-general@lists.php.net
>   | > Subject: Re: [PHP] Workflow app
>   | > for software
>   | >
>   | >
>   | > On Wed, Apr 1, 2009 at 1:38 PM,
>   | > Robert Cummings
>   | >  wrote:
>   | > > On Wed, 2009-04-01 at 13:30
>   | > >> -0500, haliphax wrote: On
>   | > >> Wed, Apr 1, 2009 at 11:53
>   | > >> > AM, bruce
>   | > >> > 
>   | > >> > wrote: and haliphax...
>   | > >> >
>   | > >> > i specifically sent the
>   | > >> > reply to only you.. you
>   | > >> > then felt the need to reply
>   | > >> > to the list as a whole
>   | > >> >
>   | > >> > hmm.. ok.. this thread is
>   | > >> > officially dead!!
>   | > >> >
>   | > >> > unless of course it gets
>   | > >> > back to the initial
>   | > >> > question...
>   | > >> >
>   | > >> > peace!!
>   | > >> >
>   | > >> >
>   | > >> >> > -Original
>   | > >> >> > Message- From:
>   | > >> >> > haliphax
>| > >> >> > Sent: Wednesday, April
>   | > >> >> > 01, 2009 5:38 AM To:
>   | > >> >> > php-general@lists.php.net
>   | > >> >> > Subject: Re: [PHP]
>   | > >> >> > Workflow app for
>   | > >> >> > software
>   | > >>
>   | > >> --8<--
>   | > >>
>   | > >> >> Again, please do not
>   | > >> >> top-post. It is the
>   | > >> >> agreed-upon procedure in
>   | > >> >> this list to bottom-post
>   | > >> >> when replying to threads.
>   | > >> >> (I am not just going
>   | > >> >> "renegade thread-Nazi" on
>   | > >> >> you.)
>   | > >> >
>   | > >> > Could you show me the
>   | > >> > signed agreement list.
>   | > >> > While it's convention on
>   | > >> > this list, it's certainly
>   | > >> > not something everyone
>   | > >> > agreed upon.
>   | > >>
>   | > >> To Rob, I meant agreed-upon
>   | > >> as in: it's been written...
>   | > >> so

Re: [PHP] extention question

2009-04-01 Thread Michael A. Peters

Per Jessen wrote:

MikeP wrote:


Hello,
How do I know if an extension (specifically php-domxml) has to be
compiled or can just be loaded.


To see if it has already been compiled, check /usr/lib/phpx/extensions

/Per




I don't believe that is the right path on rhel - it certainly isn't on 
centos (or Fedora)


[mpet...@athens ~]$ rpm -ql php-xml
/etc/php.d/dom.ini
/etc/php.d/xmlreader.ini
/etc/php.d/xmlwriter.ini
/etc/php.d/xsl.ini
/usr/lib64/php/modules/dom.so
/usr/lib64/php/modules/xmlreader.so
/usr/lib64/php/modules/xmlwriter.so
/usr/lib64/php/modules/xsl.so

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



RE: [PHP] Workflow app for software

2009-04-01 Thread HallMarc Websites
 | > >> >> agreed-upon procedure in
>   | > >> >> this list to bottom-post
>   | > >> >> when replying to threads.
>   | > >> >> (I am not just going
>   | > >> >> "renegade thread-Nazi" on
>   | > >> >> you.)
>   | > >> >
>   | > >> > Could you show me the
>   | > >> > signed agreement list.
>   | > >> > While it's convention on
>   | > >> > this list, it's certainly
>   | > >> > not something everyone
>   | > >> > agreed upon.
>   | > >>
>   | > >> To Rob, I meant agreed-upon
>   | > >> as in: it's been written...
>   | > >> so somebody had to agree to
>   | > >> it up to the point that it
>   | > >> was posted here -
>   | > >> http://us3.php.net/reST/php
>   | > >> -src/README.MAILINGLIST_RULES
>   | > >
>   | > > "It has been written" and "it
>   | > > has been agreed upon" are two
>   | > > completely different things.
>   | > > Many things have been written,
>   | > > few things are agreed upon.
>   | >
>   | > Unless the PHP development
>   | > process has become a
>   | > dictatorship, I'm pretty sure
>   | > more than one person decided it
>   | > was a good idea before putting
>   | > it in the mailing list rules.
>   | >
>   | >
>   | > -- Todd
>
> >:)
>
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



__ Information from ESET Smart Security, version of virus signature
database 3981 (20090401) __

The message was checked by ESET Smart Security.

http://www.eset.com



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



RE: [PHP] Workflow app for software

2009-04-01 Thread bruce
now that.. was funny

actually laughed out loud!


-Original Message-
From: George Larson [mailto:george.g.lar...@gmail.com]
Sent: Wednesday, April 01, 2009 12:08 PM
To: Robert Cummings
Cc: bruce; haliphax; php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


Please quit side-posting.  Thanks.

On Wed, Apr 1, 2009 at 2:58 PM, Robert Cummings wrote:

> I for one don't find you very  | On Wed, 2009-04-01 at 11:46 -0700,
> funny Bruce. It's common knowledge | bruce wrote: so haliphax...
> that it's very difficult to follow | >
> side posts. If not already, then   | > since you seem to be the primary
> they should certainly be   | > person with this issue.. at
> dictatorily banned from being used.| > least for now... i'll ahead and
>| > nominate you to the guy in
> Cheers,| > charge of making sure posters
> Rob.   | > follow the written rule to not
>| > top/down/side/left/right post...
>   | >
>   | > have fun!!!
>   | >
>   | >
>   | >
>   | > -Original Message- From:
>   | > haliphax
>   | > [mailto:halip...@gmail.com]
>   | > Sent: Wednesday, April 01, 2009
>   | > 11:42 AM To:
>   | > php-general@lists.php.net
>   | > Subject: Re: [PHP] Workflow app
>   | > for software
>   | >
>   | >
>   | > On Wed, Apr 1, 2009 at 1:38 PM,
>   | > Robert Cummings
>   | >  wrote:
>   | > > On Wed, 2009-04-01 at 13:30
>   | > >> -0500, haliphax wrote: On
>   | > >> Wed, Apr 1, 2009 at 11:53
>   | > >> > AM, bruce
>   | > >> > 
>   | > >> > wrote: and haliphax...
>   | > >> >
>   | > >> > i specifically sent the
>   | > >> > reply to only you.. you
>   | > >> > then felt the need to reply
>   | > >> > to the list as a whole
>   | > >> >
>   | > >> > hmm.. ok.. this thread is
>   | > >> > officially dead!!
>   | > >> >
>   | > >> > unless of course it gets
>   | > >> > back to the initial
>   | > >> > question...
>   | > >> >
>   | > >> > peace!!
>   | > >> >
>   | > >> >
>   | > >> >> > -Original
>   | > >> >> > Message- From:
>   | > >> >> > haliphax
>| > >> >> > Sent: Wednesday, April
>   | > >> >> > 01, 2009 5:38 AM To:
>   | > >> >> > php-general@lists.php.net
>   | > >> >> > Subject: Re: [PHP]
>   | > >> >> > Workflow app for
>   | > >> >> > software
>   | > >>
>   | > >> --8<--
>   | > >>
>   | > >> >> Again, please do not
>   | > >> >> top-post. It is the
>   | > >> >> agreed-upon procedure in
>   | > >> >> this list to bottom-post
>   | > >> >> when replying to threads.
>   | > >> >> (I am not just going
>   | > >> >> "renegade thread-Nazi" on
>   | > >> >> you.)
>   | > >> >
>   | > >> > Could you show me the
>   | > >> > signed agreement list.
>   | > >> > While it's convention on
>   | > >> > this list, it's certainly
>   | > >> > not something e

Re: [PHP] & and && and weird results

2009-04-01 Thread PJ
Lex Braun wrote:
> PJ,
>
> On Wed, Apr 1, 2009 at 1:40 PM, PJ  > wrote:
>
> SELECT * FROM book
>WHERE id IN (SELECT bookID
>FROM book_author WHERE authID IN (SELECT author.id
> 
>FROM author WHERE LEFT(last_name, 1 ) = '$Auth' &&
> LEFT(last_name, 1 ) = '$Auth1' && LEFT(last_name, 1 ) = '$Auth2'));
>
>
> Say $Auth = "I", $Auth1 = "J", $Auth2 = "K".
> The above sub-query is stating select author ids where the first digit
> in last_name is I AND the first digit in last_name is J AND the first
> digit in last_name is K.  For any given last_name (thus, author id),
> the first digit can only be one of those options, thus this sub-query
> will return ZERO results.
>
> To get a sub-query that will only return results that start with I, J,
> or K, you can instead use the following sub-query:
> SELECT author.id  FROM author WHERE LEFT(last_name,
> 1) = '$Auth' OR LEFT(last_name, 1) = '$Auth1' OR LEFT(last_name, 1) =
> '$Auth2'
>
> The above will return all author IDs where the surname starts with I,
> J, or K.
>
> - Lex
>
Thanks for that. I understand. Somehow, I had tried OR at one point but
I got one of those orange boxes probably for some other error and in the
confusion of my neurons I overlooked it.
However, I am puzzled that using & (not &&) did give a lot of results,
almost the whole db which is thankfully not very big for testing purposes.

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



Re: [PHP] & and && and weird results

2009-04-01 Thread Chris



Thanks for that. I understand. Somehow, I had tried OR at one point but
I got one of those orange boxes probably for some other error and in the
confusion of my neurons I overlooked it.
However, I am puzzled that using & (not &&) did give a lot of results,
almost the whole db which is thankfully not very big for testing purposes.


&& means "and".

"&" is a bitwise operation.

These pages explain it much better than I can.

http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html
http://au.php.net/manual/en/language.operators.bitwise.php


--
Postgresql & php tutorials
http://www.designmagick.com/


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