Re: [PHP] Re: Stupid question

2013-02-27 Thread Serge Fonville
Perhaps he could share all relevant code, since at this time we are mostly
guessing.
Declaration/assignment of a lot of variables isn't included in the snippets.

HTH

Kind regards/met vriendelijke groet,

Serge Fonville

http://www.sergefonville.nl

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table


2013/2/27 Jim Giner jim.gi...@albanyhandball.com

 On 2/26/2013 4:27 PM, Curtis Maurand wrote:

 I have the following:

 $dsn = mysqli://$username:$password@**$hostname2/$database;
 $options = array(
  'debug' = 3,
  'result_buffering' = false,
);
$dbh = MDB2::factory($dsn, $options);
  if (PEAR::isError($mdb2))
  {
  die($mdb2-getMessage());
  }




 function tallyCart($_u_id,$dbh){
 while($row = $result-fetchrow(MDB2_**FETCHMODE_ASSOC)) {
  $_showCheckOut=1;
  $_pdetail=new ProductDetail($row{'product_**ID'},
 $row{'product_Quantity'}, $_u_id);
   $_getSubTotal += $_pdetail-_subTotal;
   $_counter++;
  }
 }

 I'm getting:  Call to undefined method MDB2_Error::fetchrow()

 anyone have any ideas?  Can I not pass a database handle to a function?

 Thanks,
 Curtis


 This may be that stupid answer, but I see what appears to be two problems.

 1 - $result is not declared globally in your function header, so hence
 it's undefined, hence all of its methods are.

 2 - you have a couple indices wrapped in curly braces, not parens.  Is
 that some new kind of syntax I'm not aware of?



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




RE: [PHP] Re: Stupid question

2013-02-27 Thread Ford, Mike
 -Original Message-
 From: Jim Giner [mailto:jim.gi...@albanyhandball.com]
 Sent: 27 February 2013 12:28
 
 
 2 - you have a couple indices wrapped in curly braces, not parens.
 Is
 that some new kind of syntax I'm not aware of?

No, that's some old kind of syntax you have no reason to be aware of :).

Curly braces as an alternative to square brackets have been deprecated for,
oooh, probably several years now...!


Cheers!

Mike

-- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Portland PD507, City Campus, Leeds Metropolitan University,
Portland Way, LEEDS,  LS1 3HE,  United Kingdom 
E: m.f...@leedsmet.ac.uk T: +44 113 812 4730




To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



RE: [PHP] Re: Stupid question

2004-03-17 Thread Chris W. Parker
Luis Mirabal mailto:[EMAIL PROTECTED]
on Wednesday, March 17, 2004 3:18 PM said:

 as Chris W. Parker noticed, there is a little mistake in the example
 above posted by me, it says:

i'd like to thank the academy, my parents, God, my cat, and all of those
that voted for me!

thank you!

kisses


:)

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



Re: [PHP] Re: stupid question

2002-08-14 Thread Liam MacKenzie

Ok, point taken.
Sorry, I didn't know.

Also, thanks for the help, I got it  :-)


- Original Message - 
From: Jean-Christian Imbeault [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 15, 2002 1:52 PM
Subject: [PHP] Re: stupid question


Liam, when you want to post a new message to the list don't just hit the 
reply button and change the subject. If you do that you message appears 
in the thread of the message you replied to.

It really messes things up for people who follow message threads. And 
worse you might not get any answers to your question since your question 
has nothing to do with the thread your posting now becomes part of.

To answer you question though:

I don't know of any short-hand for what you want to do. But this should 
work.

if ( ($idx != 1)  ($idx == 4)  ($idx == 9) ) {
   echo$results;
}

You could also look into using a regexp.

Jc

Liam Mackenzie wrote:
 Ok, I'm having a blonde day...
 
 If $idx == 1, 4 or 9 I don't want it to echo $results.
 I have this, what's the syntax to put multiple values in there?
 
 
 if ($idx != 1) {
 echo$results;
 }
 
 
 Thanks,
 Liam
 
 
 


-- 
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