AdoDB
Permalink
Okay, so AdoDB is not used anymore (Whyyyyy? Why in gods name????).
While GetAll and a few other AdoDB calls seem still to work others don't.
What's the simple equivalent now to "CacheGetAll"?
While GetAll and a few other AdoDB calls seem still to work others don't.
What's the simple equivalent now to "CacheGetAll"?
Thanks a lot for your help! I'll try that out.
I still don't understand why AdoDB, which is my absolute favorite has been replaced. It was very easy to use. One of the reasons that drew me to concrete5 was the use of AdoDB, so I'm very disappointed that it has been replaced.
Performance reason is the only thing that comes in mind. Oh well... :(
Wonder if the slight performance boost is worth to replace easy one-liners with a crap-load of code. In my eyes it's not. If I want speed I use phalcon anyway.
I still don't understand why AdoDB, which is my absolute favorite has been replaced. It was very easy to use. One of the reasons that drew me to concrete5 was the use of AdoDB, so I'm very disappointed that it has been replaced.
Performance reason is the only thing that comes in mind. Oh well... :(
Wonder if the slight performance boost is worth to replace easy one-liners with a crap-load of code. In my eyes it's not. If I want speed I use phalcon anyway.
Mhm, okay not that much code after I gave it a good look. Must have been Mr. Grumpy that spoke :)
Alright, so I tried a few things, and it seems like things really got more complicated and tedious. Another problem that I have now is that a simple query worked in AdoDB (5.6) flawless:
I don't write the whole Select part as it's a lot and doesn't matter to the problem. Fact is, it worked without a problem but doesn't works anymore in 5.7 and the Doctrine->AdoDB abstraction layer. Also doesn't work in Doctrin's own code. If I remove the last two "?" and replace them directly with the numbers 0 and 999 it works. So the problem is solely with the last two ?'s.
Any idea? I worked hours on it already and it costs a lot of nerves.
$sql = "SELECT lotsofblablastuffandjoins WHERE mmctm.mcID = ? GROUP BY msm.mID ORDER BY msm.movieYear ASC LIMIT ?,?"; $vals = array(12,0,999); $rows = $db->GetAll($sql, $vals);
I don't write the whole Select part as it's a lot and doesn't matter to the problem. Fact is, it worked without a problem but doesn't works anymore in 5.7 and the Doctrine->AdoDB abstraction layer. Also doesn't work in Doctrin's own code. If I remove the last two "?" and replace them directly with the numbers 0 and 999 it works. So the problem is solely with the last two ?'s.
Any idea? I worked hours on it already and it costs a lot of nerves.
The problem probably is that Doctrine (or PDO) interprets the offset and limit as strings and quotes them. Try writing the query like this:
Thank you, that was it!
Used your solution and now it works. I have to change a crap-load of code now, but at least I'm not stuck anymore.
Used your solution and now it works. I have to change a crap-load of code now, but at least I'm not stuck anymore.
As per caching, here is a quick code snippet to get you started
[0]http://www.doctrine-project.org/...
[1]https://github.com/concrete5/concrete5-5.7.0/blob/develop/web/concre...
[2]http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/r...
Edit: Refactor for clarity