On Fri, 2009-12-18 at 10:21 -0800, Allen McCabe wrote:
In a nutshell:
Will this work?
if ($perm == (11 || 12))
Explanation:
I am laying the groundwork for a photo viewing system with a private and
public mode, and additionally if an admin is logged in, there is an
additional
Thank you Ashley, it makes perfect sense. I don't know why I didn't just set
up some tests like Shiplu suggested!
I've rewritten all my code BACK to the correct way. (I thought it looked
cooler, oh well).
On Fri, Dec 18, 2009 at 10:47 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On
Hi,
Yes, what Ashley said is correct. Also, if you want to avoid writing
$perm several times in the if, or if you have a lot of permissions you
can do:
if (in_array($perm, array(11, 22)))
And you can put in that array all the permissions you need to.
Regards,
Jonathan
On Fri, Dec 18, 2009 at
Devendra Jadhav wrote:
what do you think about this?
if( ! (page == 1 page == 2)){
//here
}
Well a simple (and) does not help.
I want to have all results that contain either page = 1 OR page = 3, AND
in the same time I want to have the results that contain page=2 OR page= 3
, But
On Mon, 2009-12-07 at 11:52 +0100, Merlin Morgenstern wrote:
Hello everybody,
I am having trouble finding a logic for following problem:
Should be true if:
page = 1 OR page = 3, but it should also be true if page = 2 OR page = 3
The result should never contain 1 AND 2 in the same time.
Ashley Sheridan wrote:
On Mon, 2009-12-07 at 11:52 +0100, Merlin Morgenstern wrote:
Hello everybody,
I am having trouble finding a logic for following problem:
Should be true if:
page = 1 OR page = 3, but it should also be true if page = 2 OR page = 3
The result should never contain 1 AND
On Mon, 2009-12-07 at 12:49 +0100, Merlin Morgenstern wrote:
Ashley Sheridan wrote:
On Mon, 2009-12-07 at 11:52 +0100, Merlin Morgenstern wrote:
Hello everybody,
I am having trouble finding a logic for following problem:
Should be true if:
page = 1 OR page = 3, but it should also
Merlin Morgenstern wrote:
You have described the problem very well. This is exactly where I can
not find a solution.
the page number translates to the following: 1= first page 2= following
pages 3= all pages
This are the options a user has while booking a product on my site. Now
if ther is
Hey Merlin
Merlin Morgenstern wrote on 2009-12-07 11:52:
Hello everybody,
I am having trouble finding a logic for following problem:
Should be true if:
page = 1 OR page = 3, but it should also be true if page = 2 OR page = 3
The result should never contain 1 AND 2 in the same time.
This
At 11:52 AM +0100 12/7/09, Merlin Morgenstern wrote:
Hello everybody,
I am having trouble finding a logic for following problem:
Should be true if:
page = 1 OR page = 3, but it should also be true if page = 2 OR page = 3
The result should never contain 1 AND 2 in the same time.
This
Hi everybody,
thank you for all the help and thoughts. I have solved it, but I guess
it is not an elegant solution. What I do now, is simply check again for
the second case. There are 2 cases. Either first page OR all pages,
second case: following pages OR all pages.
My booking checking
If this seems simple to you remember I have no formal training in logic
structure or DB design
Neither do I - and probably a lot of others here too ;)
the value of a status field is given in the sdk text as such...
...This number is determined by adding the following values
On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
Hi all
This is not exactly PHP, but an issue that we have to work out in code
(whatever we use) -
I am working on a shopping cart site which will have orders from any
On Oct 18, 2008, at 11:10 PM, Robert Cummings wrote:
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
To cut down on fraudulent orders, our cc processor (whatever we call
them), to enable Address Verification System (AVS), ...
The
docs make this clear that they want: The numeric
On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote:
On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
Hi all
This is not exactly PHP, but an issue that we have to work out in code
(whatever we use) -
I am working
On Sun, 2008-10-19 at 11:26 -0400, Robert Cummings wrote:
On Sun, 2008-10-19 at 10:03 +0100, Ashley Sheridan wrote:
On Sun, 2008-10-19 at 01:10 -0400, Robert Cummings wrote:
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
Hi all
This is not exactly PHP, but an issue that we
AVS generally only exists for us and canada and parts of the uk, if I
remember correctly. Usually they're just looking for the beginning
part of the street address, not the concatenation or anything else
like that. No need for apartment numbers, for example if you're just
looking at avs.
If
On Sat, 2008-10-18 at 22:56 -0600, Govinda wrote:
Hi all
This is not exactly PHP, but an issue that we have to work out in code
(whatever we use) -
I am working on a shopping cart site which will have orders from any
country.
To cut down on fraudulent orders, our cc processor
tedd wrote:
If two, or more, users hit the site at the same time then a RACE
condition may have one user getting something they didn't ask for or
not getting anything at all.
The complicated way I figure I could solve this would be to:
1. Generate a random string name for the file --
Write a script that cron runs that checks dates of files and removes 1 month
old ones?
On Wed, Jul 9, 2008 at 4:45 PM, tedd [EMAIL PROTECTED] wrote:
Hi gang:
Here's the logic problem.
First the site:
http://php1.net/b/zip-files/
Now, the site works well enough. The user selects what
On Wed, Jul 9, 2008 at 7:45 PM, tedd [EMAIL PROTECTED] wrote:
Hi gang:
Here's the logic problem.
First the site:
http://php1.net/b/zip-files/
Now, the site works well enough. The user selects what they want, clicks
Submit, the order is assembled in zip file and presented to the user for
generate a unique hash as the name based on the contents of the zip, then if 2
people
happen to want exactly the same selection you won't have to build/zip it twice
...
just check if the zip happens to exist before trying to build it.
have the script do garbage collection on old zip files ...
On Wed, Jul 9, 2008 at 6:11 PM, Jochem Maas [EMAIL PROTECTED] wrote:
generate a unique hash as the name based on the contents of the zip, then
if 2 people
happen to want exactly the same selection you won't have to build/zip it
twice ...
just check if the zip happens to exist before trying
tedd wrote:
Hi gang:
Here's the logic problem.
First the site:
http://php1.net/b/zip-files/
Now, the site works well enough. The user selects what they want, clicks
Submit, the order is assembled in zip file and presented to the user for
downloading.
However, as it stands now, before the
Hi, I am doing an online calendar for holiday application.
Now I got a table with these fields among many others.
`req_id` int(11) NOT NULL auto_increment,
`req_date` date NOT NULL,
`username` varchar(100) NOT NULL,
`start_date` date NOT NULL,
`end_date` date NOT NULL,
`days_off`
On Thu, 16 Dec 2004 13:11:02 +1100, Jeffery Fernandez
[EMAIL PROTECTED] wrote:
I am trying to build a html menu dynamically from data sitting in an
array. I have been successful so far until it came to the point of
populating the sub-menu of the system. Can someone help me out with the
logic
Wee Keat wrote:
Hey Jeff,
How are you mate? Was lazying around and saw your email to the list. :)
What exactly do you need help with? Is it the following line?
// Stuck here
$html_menu .= lia href=\Need to get
value\$sub_page/a/li;
}
$html_menu .= '/ul';
Do you
Alex Hogan wrote:
Hi All,
I am having a logic problem. (insert jokes here) I am trying to create a
function that will allow me to pass any number of fields and tables into a
blanket query.
I am getting an error; Unexpected foreach. I have tried placing the loop in
several different places and
[snip]
$query = SELECT ;
$start = true;
foreach ( $array1 as $flds ) {
if ( $start ) {
$query .= $flds[$i];
$start = false;
} else {
$query .= , . $flds[$i];
}
}
$query .= FROM ;
$start = true;
foreach ( $array2 as $tbls )
[snip]
I do have one question though. I ran your code and it only returns the
first letter for that element in the array. For instance fieldone returns
as f and tableone returns as t. The output looks like this; SELECT f,f,f
FROM t,t.
[/snip]
Never mind I found it. It should be;
$query =
Apr 20 at 9:55am, Alex Hogan wrote:
function myselect($array1, $array2){
$query = SELECT.foreach($array1 as $flds){ $flds[$i]; }.
FROM.foreach($array2 as $tbls){ $tbls[$n]; } ...
Alex, if you merely wish to place the values of an array into your
query, you might also try doing it this
On 20 April 2004 16:44, Alex Hogan wrote:
foreach ( $array1 as $flds ) {
if ( $start ) {
$query .= $flds;
$start = false;
} else {
$query .= , . $flds;
}
}
$query .= implode(, , $array1);
Cheers!
Mike
Alex Hogan wrote:
snip
I gotcha..,
I do have one question though. I ran your code and it only returns the
first letter for that element in the array. For instance fieldone
returns as f and tableone returns as t.
The output looks like this;
SELECT f,f,f FROM t,t.
alex
What's in your array?
What's in your array?
$array1[0] = 'firstname';
$array1[1] = 'lastname';
$array1[2] = 'tkt_title';
I got that fixed.
Thanks.
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and
How about building an array of all the levels:
$a = array();
for ($i = 1; $i = $maxlevels; $i++)
$a[] = $i;
then for each level you can create a new array that is the difference
between the original array and an array that contains the current level:
for ($i = 1; $i = $maxlevels; $i++)
-Original Message-
From: Marco Tabini [mailto:marcot;tabini.ca]
Sent: 11 November 2002 14:46
To: Tony Crockford
Cc: Php-GeneralLists. Php. Net
Subject: Re: [PHP] Logic headache, please help.
How about building an array of all the levels:
$a = array();
for ($i = 1; $i
Crockford wrote:
-Original Message-
From: Marco Tabini [mailto:marcot;tabini.ca]
Sent: 11 November 2002 14:46
To: Tony Crockford
Cc: Php-GeneralLists. Php. Net
Subject: Re: [PHP] Logic headache, please help.
How about building an array of all the levels:
$a = array
On Tue, Jun 04, 2002 at 04:40:26AM +0400, Ricardo Fitzgerald wrote:
I'm trying to echo a neat table
I've GOT to bust your chops. That table and your code are anything BUT
neat. For neat, you need to put /td tags to close each cell. Also
nest your code properly...
if ($value2 ==0) {
The problem here is that you have defined three different variables
$value1,$value2,$value3.
Keep only one variable (say,$valueChk) that can take values 1,2 or 3.
Then check for the condition.
And there's another mistake in the script, you are checking
---if ($value2 ==0)---
twice, you probably
]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Naintara Jain
Sent: Tuesday, June 04, 2002 2:37 PM
To: Ricardo Fitzgerald; [EMAIL PROTECTED]
Subject: RE: [PHP] Logic -- conditional statements
The problem here is that you have defined three different variables
$value1,$value2,$value3.
Keep
You need parentheses around the entire antecedent:
if (($type !=add) || ($type !=edit) || ($type !=delete)) { //etc
^--- Note these parentheses---^
Hope that helps.
At 05:28 PM 12/4/2001, Dan McCullough wrote:
Question. I am trying to check to see if a
that didnt work,i started off with
if ($type != add) {
that works
} else {
this works
}
I have done this before I'm just having a brain cramp.
if (($type != add) || ($type != edit) || ($type != delete)) {
print $subcat_output;
} else {
print TRTD BGCOLOR=\#F7F7F7\ WIDTH=\20%\/TDTD
now change || to and see if that does the job
-Original Message-
From: Dan McCullough [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 12:57 PM
To: PHP General List
Cc: Richard S. Crawford
Subject: Re: [PHP] Logic
that didnt work,i started off with
if ($type != add
Dan McCullough [EMAIL PROTECTED] wrote:
Question. I am trying to check to see if a certain piece of code should
be run. Here is an
example.
if ($type != add) || ($type != edit) || ($type != delete) {//if this
or this or this then
then run this code
As pointed out, your paranthesis will
try:
http://php.resourceindex.com/Complete_Scripts/Link_Management/
you should be able to find some examples here.
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
PHP
45 matches
Mail list logo