Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15128
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Appropriate PDO::PARAM_<what here> for monetary value |
| Date | 2015-03-23 20:41 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <meqbr0$rin$1@dont-email.me> (permalink) |
| References | <f4e9620d-19da-402a-94e5-de45797377f3@googlegroups.com> |
On 3/23/2015 7:23 PM, Fernando Basso wrote: > Suppose I have this situation: > > $price = '33.99'; > $sth = $db->prepare( $sql ); > $sth->bindParam( ':price', $price, PDO::PARAM_<what here?> > > What is the appropriate PDO param constant for that situation? > It all depends on what the type in the database is. Is it a numeric type such as FLOAT or DOUBLE? Or is it a string type such as VARCHAR? The type here needs to match what's in the database. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Appropriate PDO::PARAM_<what here> for monetary value Fernando Basso <fernandobasso.br@gmail.com> - 2015-03-23 16:23 -0700
Re: Appropriate PDO::PARAM_<what here> for monetary value Jerry Stuckle <jstucklex@attglobal.net> - 2015-03-23 20:41 -0400
Re: Appropriate PDO::PARAM_<what here> for monetary value Fernando Basso <fernandobasso.br@gmail.com> - 2015-03-23 17:56 -0700
Re: Appropriate PDO::PARAM_<what here> for monetary value Jerry Stuckle <jstucklex@attglobal.net> - 2015-03-23 21:23 -0400
Re: Appropriate PDO::PARAM_<what here> for monetary value Fernando Basso <fernandobasso.br@gmail.com> - 2015-03-24 10:42 -0700
csiph-web