At 03:43 PM 11/27/2006, Randal Rust wrote:
Yeah, I know. This is the client's hair-brained idea. I told him I'd
take a look. The problem all goes back to how they are handling their
data.
They are using LDAP for data storage. Each record has a 'key' value
which they want to be unique. The key i
Randal Rust wrote:
> If $unique returns false, I need to run some other scripts that will
> *attempt* to uniquely generate a new value, then take the new value
> and run checkDuplicate() again. And so on until $unique returns true.
while (!$unique) {
/* Change $newTeam */
$unique = checkDu
On 11/27/06, Chris Shiflett <[EMAIL PROTECTED]> wrote:
As a helpful suggestion, when it takes 40 lines of code to check to see
whether a value is in an array, it's probably a good idea to take a step
back and see if there is a simpler solution:
Yeah, I know. This is the client's hair-brained i
On 11/27/06, Ken Robinson <[EMAIL PROTECTED]> wrote:
$unique = checkDuplicate($newTeam);
Again, my fault for not being clear enough.
If $unique returns false, I need to run some other scripts that will
*attempt* to uniquely generate a new value, then take the new value
and run checkDuplicate(
Randal Rust wrote:
> while(!$unique) {
> $check=checkDuplicate($newTeam);
>
> if($check) {
> $unique=true;
> } else {
> $unique=false; }
> }
Guess what happens when $unique is FALSE?
As a helpful suggestion, when it takes 40 lines of code to check to see
whether a
On 11/27/06, Rob Marscher <[EMAIL PROTECTED]> wrote:
The way it looks now... your doing a while loop that will keep looping
until unique is true. If unique never gets set to true, then it's going
to loop forever. I don't see a need for that while loop.
I didn't properly explain before. I do
On 11/27/06, Scott Mattocks <[EMAIL PROTECTED]> wrote:
I am confused as to why you are looping over one value to begin with?
Oh yeah, that would probably have been helpful.
OK, the deal is that I need to ensure that the value that gets
inserted into the LDAP directory is unique. So if the val
The way it looks now... your doing a while loop that will keep looping
until unique is true. If unique never gets set to true, then it's going
to loop forever. I don't see a need for that while loop. You can just do
$unique=checkDuplicate($newTeam);
also... your function could be simplified
Randal Rust wrote:
I have always had trouble with trying to write these from scratch. The
code below is essentially what I have been working on, but it never
stops looping. What am I missing here?
I am confused as to why you are looping over one value to begin with?
You really only need to loo
At 03:10 PM 11/27/2006, Randal Rust wrote:
I have always had trouble with trying to write these from scratch. The
code below is essentially what I have been working on, but it never
stops looping. What am I missing here?
You don't need a loop here. The loop is in the function, where it belong
I have always had trouble with trying to write these from scratch. The
code below is essentially what I have been working on, but it never
stops looping. What am I missing here?
--
Randal Rust
R.Squared Communications
www.r2communications.com
___
New
11 matches
Mail list logo