# |
Aug 9th 2008, 15:02 |
AD7six |
eaqua: don't use a method that is designed to underscore caps |
# |
Aug 9th 2008, 15:01 |
infantigniter |
eaqua: is MYSQL case sensitive? |
# |
Aug 9th 2008, 15:01 |
eaqua |
hy. I have a strange cakephp error: I have findByALLCAPSCOLUMN() which gets translated into something like SELECT Table.ALLCAPS where Table.a_l_l_c_a_p_s='something'. Note the whole bunch of underscores. I assume it might have something to do with the inflections.php. But I haven't touched the server at all (unless there was some new php/mysql installed). Any hints ? |
# |
Aug 9th 2008, 15:00 |
infantigniter |
or should i try to make my own forum system |
# |
Aug 9th 2008, 15:00 |
AD7six |
barduck: I don't see why not: https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/model.php#L1828 |
# |
Aug 9th 2008, 15:00 |
infantigniter |
does anybody have recommendations for an onsite forum, specifically one that could be integrated with my existing cake user system |
# |
Aug 9th 2008, 14:58 |
barduck |
AD7six: nope...I never even executes the query... |
# |
Aug 9th 2008, 14:58 |
AD7six |
find('count', array('fields' => ..? |
# |
Aug 9th 2008, 14:58 |
AD7six |
barduck: does it work? |
# |
Aug 9th 2008, 14:56 |
jaredhoyt |
'mailing_address' is tinytext and 'country' is varchar |
# |
Aug 9th 2008, 14:56 |
barduck |
althought I never used it since |
# |
Aug 9th 2008, 14:56 |
barduck |
AD7six: that once was fixed for findCount -> https://trac.cakephp.org/ticket/2445 |
# |
Aug 9th 2008, 14:55 |
jaredhoyt |
i did a pr($this->data) right before the return true; and the 'mailing_address' and 'country' fields are present and contain the correct values... they're just not ending up in the db |
# |
Aug 9th 2008, 14:55 |
barduck |
AD7Six: yes, that would work, of course. I thought there might be some parameter that I can just pass to find('count') to make it cleaner |
# |
Aug 9th 2008, 14:55 |
jaredhoyt |
http://bin.cakephp.org/view/1205572484 |
# |
Aug 9th 2008, 14:54 |
jaredhoyt |
the rest of the data is, just not these two particular fields i'm changing |
# |
Aug 9th 2008, 14:54 |
AD7six |
barduck: doesn't find('first', array('fields' => 'COUNT(DISTINCT....) AS count' ..? |
# |
Aug 9th 2008, 14:54 |
jaredhoyt |
hmm, my beforeSave() doesn't seem to be working correctly ... i'm formating some fields before saving and i've done a pr($this->data) just to make sure it's coming out correctly (which it is) ... they're just not showing up in the db |
# |
Aug 9th 2008, 14:54 |
barduck |
I guess I can just do a find('all', 'COUNT(...)') myself but I thought there might be a more elegant way |
# |
Aug 9th 2008, 14:52 |
barduck |
TheBig: not sure what you mind but I have a query with some complicated joins in it and in order to get the result I need, I need to use DISTINCT on the main model. That works well in the find('all') model but I also need a total count of these items (for pagination) |
# |
Aug 9th 2008, 14:51 |
TheBig |
you should do Post->find('count', by user) |
# |
Aug 9th 2008, 14:50 |
TheBig |
instead of doing User->find('count', bla bla posts) |
# |
Aug 9th 2008, 14:50 |
TheBig |
it hangs on what you need, but let's say you need post of a user |
# |
Aug 9th 2008, 14:49 |
barduck |
TheBig: what do you mean ? |
# |
Aug 9th 2008, 14:49 |
TheBig |
barduck, why don you make a find('count') of that model? |
# |
Aug 9th 2008, 14:49 |
jaredhoyt |
except i'd imagine it wouldn't even let the fields pass into $this->data |
# |
Aug 9th 2008, 14:48 |
barduck |
hey, how can I tell find('count') to count DISTINCT Model.* instead of * ? |
# |
Aug 9th 2008, 14:48 |
jaredhoyt |
i've never used it |
# |
Aug 9th 2008, 14:48 |
jaredhoyt |
is SecurityComponent::disabledFields like the opposite of the $whiteList in save()? |
# |
Aug 9th 2008, 14:43 |
DrBacchus |
Glad to help in what small ways I can. |
# |
Aug 9th 2008, 14:43 |
DrBacchus |
Better now? |
# |
Aug 9th 2008, 14:40 |
klaasjan |
man you are a legend |
# |
Aug 9th 2008, 14:38 |
klaasjan |
i 'll try |
# |
Aug 9th 2008, 14:34 |
DrBacchus |
Now your .htaccess files should work fine. |
# |
Aug 9th 2008, 14:34 |
klaasjan |
Ok i'v changed that to all |
# |
Aug 9th 2008, 14:34 |
DrBacchus |
AllowOverride is set per directory. |
# |
Aug 9th 2008, 14:34 |
DrBacchus |
And then inside that block, you'll see another AllowOverride directive |
# |
Aug 9th 2008, 14:34 |
DrBacchus |
so you should see <Directory "C:/Program Files/php/apache2/htdocs"> |
# |
Aug 9th 2008, 14:33 |
DrBacchus |
ok good |
# |
Aug 9th 2008, 14:33 |
klaasjan |
i guess |
# |
Aug 9th 2008, 14:33 |
klaasjan |
C:/Program Files/php/apache2/htdocs"> |