FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Why does my PDO query with named parameters return a blank result?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Why does my PDO query with named parameters return a blank result? [message #179319 is a reply to message #179317] Wed, 03 October 2012 19:13 Go to previous messageGo to previous message
tom.rankin51 is currently offline  tom.rankin51
Messages: 17
Registered: September 2012
Karma:
Junior Member
Apologies for the ORDER BY DESC further on in the code - I caught that and forgot to remove it.

I understand what I've done with the AND - it makes sense and explains things a lot. However...

....when I've been reading about PDO and named parameters, I always see examples typed as WHERE foo = :foo I struggle to see why it works in an example, and why it does not in one of my failed attempts? Do parameters have to be declared?

I've tried different permutations of the postdate and $mydate part, and I'm really not sure how I can make it say postdate > $mydate by using parameters. Is there an accepted way, or standard way of doing this?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is Symfony 2 on-topic in this newsgroup?
Next Topic: How to run a batch file using PHP?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 16:07:12 GMT 2024

Total time taken to generate the page: 0.05498 seconds