On Nov 18, 5:51 pm, "nate" <[EMAIL PROTECTED]> wrote:
> I had this happen once.  I believe it has something to do with how your
> database encoding is set up.

Upon further inspection, I believe it occurs when MySQL has to create a
temporary table during the SELECT process. This is more likely to occur
in a GROUP BY or ORDER BY (according to the docs). The question is
whether you could reliable identify a temporary table. It seems to have
a consistent naming convention (#sql_XXX_0). Not sure how much you'd
want to rely on that.

Alternatively, you could do one of two things:

1. check all configured models in the app and if the table name isn't
one of them, give it a consistent name (I believe it's '0' currently
but maybe something like '_unknown' would be more accurate).
2. do a 'show tables' on the database and compare against that. If it's
not in the list, it's temporary. You could cache this info like you
would a 'DESC tablename'.

Anyways, those are my thoughts.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to