Re: [PHP] issues with calling methods twice in a row

2008-02-08 Thread Jochem Maas

nihilism machine schreef:
i have a method called CreateUser() which is public and takes 5 
variables as its data, then adds them to a db. it only executes the 
first method not the other although its all the same but the variable.


ex:

$auth = new auth();
$auth->CreateUser("fake email", 1, "fake name", 4);
$auth->CreateUser("fake email", 2, "fake name", 4);
$auth->CreateUser("fake email", 3, "fake name", 4);
$auth->CreateUser("fake email", 4, "fake name", 4);
$auth->CreateUser("fake email", 5, "fake name", 4);

any ideas? only the first method gets executed?


no-one can smell the problem with the info you gave.

what is the code for createUser()?
what is does you error log contain?
are you displaying errors? (you should probably do so in a dev environment)
are the 2nd + subsequent calls being made and nothing is entering
in the DB OR are the 2nd + subsequent calls not occuring at all?





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



Re: [PHP] issues with calling methods twice in a row

2008-02-08 Thread Nathan Nobbe
On Feb 8, 2008 4:25 PM, nihilism machine <[EMAIL PROTECTED]> wrote:

> that was just an example. yes they both provide 5 input variables.


well theres something preventing successive calls from doing what you
expect.  php has no issue in calling the same instance method successively,
which you could verify with a simple test case.

-nathan


Re: [PHP] issues with calling methods twice in a row

2008-02-08 Thread nihilism machine

that was just an example. yes they both provide 5 input variables.

On Feb 8, 2008, at 4:18 PM, Jim Lucas wrote:


nihilism machine wrote:
i have a method called CreateUser() which is public and takes 5  
variables as its data, then adds them to a db. it only executes the  
first method not the other although its all the same but the  
variable.


Here you say that the method takes five (5) variables.


ex:
$auth = new auth();
$auth->CreateUser("fake email", 1, "fake name", 4);
$auth->CreateUser("fake email", 2, "fake name", 4);
$auth->CreateUser("fake email", 3, "fake name", 4);
$auth->CreateUser("fake email", 4, "fake name", 4);
$auth->CreateUser("fake email", 5, "fake name", 4);


But here, you are only putting 4 variables in the method call.

Are you missing something that is required?  The fifth field perhaps?


any ideas? only the first method gets executed?



--
Jim Lucas

  "Some men are born to greatness, some achieve greatness,
  and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
   by William Shakespeare



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



Re: [PHP] issues with calling methods twice in a row

2008-02-08 Thread Nathan Nobbe
On Feb 8, 2008 4:10 PM, nihilism machine <[EMAIL PROTECTED]> wrote:

> i have a method called CreateUser() which is public and takes 5
> variables as its data, then adds them to a db. it only executes the
> first method not the other although its all the same but the variable.
>
> ex:
>
> $auth = new auth();
> $auth->CreateUser("fake email", 1, "fake name", 4);
> $auth->CreateUser("fake email", 2, "fake name", 4);
> $auth->CreateUser("fake email", 3, "fake name", 4);
> $auth->CreateUser("fake email", 4, "fake name", 4);
> $auth->CreateUser("fake email", 5, "fake name", 4);
>
> any ideas? only the first method gets executed?


whats going on inside CreateUser(), have you tried tracing the logic?
are the successive calls raising any errors?

-nathan


Re: [PHP] issues with calling methods twice in a row

2008-02-08 Thread Jim Lucas

nihilism machine wrote:
i have a method called CreateUser() which is public and takes 5 
variables as its data, then adds them to a db. it only executes the 
first method not the other although its all the same but the variable.


Here you say that the method takes five (5) variables.



ex:

$auth = new auth();
$auth->CreateUser("fake email", 1, "fake name", 4);
$auth->CreateUser("fake email", 2, "fake name", 4);
$auth->CreateUser("fake email", 3, "fake name", 4);
$auth->CreateUser("fake email", 4, "fake name", 4);
$auth->CreateUser("fake email", 5, "fake name", 4);


But here, you are only putting 4 variables in the method call.

Are you missing something that is required?  The fifth field perhaps?



any ideas? only the first method gets executed?




--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



[PHP] issues with calling methods twice in a row

2008-02-08 Thread nihilism machine
i have a method called CreateUser() which is public and takes 5  
variables as its data, then adds them to a db. it only executes the  
first method not the other although its all the same but the variable.


ex:

$auth = new auth();
$auth->CreateUser("fake email", 1, "fake name", 4);
$auth->CreateUser("fake email", 2, "fake name", 4);
$auth->CreateUser("fake email", 3, "fake name", 4);
$auth->CreateUser("fake email", 4, "fake name", 4);
$auth->CreateUser("fake email", 5, "fake name", 4);

any ideas? only the first method gets executed?

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