I have the exact problem as in this topic:
http://groups.google.com/group/cake-php/browse_thread/thread/1522701f158e90b8/a25f475b8f5230ee?lnk=gstq=habtm+JOIN+query+errorrnum=2#a25f475b8f5230ee
-
Query:
SELECT `State`.`id`, `State`.`name`, `State`.`abbr` FROM `states` AS
`State` JOIN
'.
Not an ideal solution, but it did solve the problem for MySQL 3.23
Regards,
Langdon
Bret Kuhns wrote:
I have the exact problem as in this topic:
http://groups.google.com/group/cake-php/browse_thread/thread/1522701f...
--~--~-~--~~~---~--~~
You received this message
I would like to protect a controller action from being directly
accessed directly by its URL. And no, I'm not talking about a user
authentication system. I have two controllers: Payments and Orders.
Payments is used first to save credit card information from the user,
then it redirects to the
@PhpNut
Thanks for the quick reply. I tried several queries in the group and on
google looking for what I needed and couldn't find a relevant solution
(almost all results were about user authentication, othAuth,
rdSimpleAuth...). I suppose it helps if you know exactly what to search
for, but I
@PhpNut
The code snippet you gave me didn't work for me. I searched around and
found this change ticket: https://trac.cakephp.org/changeset/3783/ .
From the looks of the code, the 'requested' key is set to 1, not a
boolean. I changed my condition operator to == so that PHP would
attempt to cast
Tony,
I agree, the retuning of arrays doesn't support good object-oriented
practices. But arrays are extremely flexible and easy to work with in
PHP, so that's probably why the developers chose to use them in
CakePHP. Version 2 of Cake, however, is supposively going to completely
change the way
I've never done this before so I have no idea how cake itself would
handle it (if someone knows for sure, please chime in), but because
models are objects that extend the AppModel, you could create a generic
model object that extends AppModel which provides the generic structure
of your multiple
Yes John, I know what the AppModel is. But my idea is that instead of
clogging your AppModel full of specific stuff that applies to only the
few tables that Kabuto is talking about in this topic, you create a
container model (that extends the AppModel for *application-wide*
code) that holds the
on my own...
Also, to John:
John David Anderson (_psychic_) wrote:
On Aug 17, 2006, at 8:01 PM, Bret Kuhns wrote:
Contrary to popular practice,
There's a reason for this... ;o)
I was expecting that response. Though I've seen many benchmarks and
quality articles that argue it's a viable
Chris, thanks for the reply and for backing up my database approach ;)
Unfortunately that didn't fix the problem. The issue seems to be that,
although my Album model can recursively retrieve data from the Image
model, it can't access the Image model in my field list for the find()
argument.
Contrary to popular practice, I want to create a gallery script using
BLOB fields in my database to store the images and thumbnails. When I
retrieve the list of gallery albums, cake recursively gets all the
fields from the associated images table. However, pulling all of this
data at once with
If you're doing what I think you are, then you're trying to save the
contents of the file itself into a blob field of your database.
However, your first example seems to be inserting the file*name* of the
file into your blob field. You need the binary data of the file itself
and store it in your
Also, don't forget you need to account for the redirect in your
flash.thtml layout...
in /app/views/layouts/flash.thtml, you must do this:
head
meta http-equiv=Refresh content=?=$pause?;url=?=$url? /
/head
$pause and $url are assigned to the layout by your call to flash().
I completely agree with 100rk. MVC can be a design paradigm that people
don't quite grasp right away. There are lots of people who don't
understand Rails because of the same reason. But once those people
start getting answers on the group/IRC/manual/API/etc and play with
cakePHP more, they will
Marcelo, consider yourself lucky. Stay away from the evil that is
ASP.NET... I've been developing websites for 6 years and I absolutely
struggled through the class trying to figure out the very strange
microsoft oddities thrown into ASP.NET. You wouldn't believe how
involved it is just to put a
I was using the generateList() method to create an array I could use in
a select drop down. Using the method without params would create an
array of the ids, but when I tried to use the $keyPath and $valuePath
params to create a key=value array that I could use, nothing was
returned.
The manual
Thank you for your explanation. This idea seems very similar to
ASP.NET's datasource concept in which data from any supported source
(such as XML or most DBMS as mentioned) are treated exactly the same.
This should become yet another useful resource for cake.
Ahah, after just finishing a semester on ASP.NET I feel confident in
completely agreeing with you. CakePHP is one more reason to not use
ASP.NET :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To
Interesting insight nate, thanks very much :) I really should get
around to reading a good book about MVC to learn more...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send
19 matches
Mail list logo