Hi Folks,

I'm trying to create a self-install routine for my web app, part of
which requires it to create multiple tables with some pre-set content.

I use a system similar to that mentioned by Cakebaker, (http://
cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-cakephp-
application/), which, for the most part, works fine.

The problem arises when I'm trying to load the SQL data into the
database.  The tables will load just fine, but there are content rows
that contain serialized information.  When it comes to executing those
lines of code, (using the rawQuery routine, I get an MySQL syntax
error.

Here's what I'm currently doing:

       $statements =
file_get_contents($fileNameOfSQLDump,'FILE_TEXT');
       $db->rawQuery($statements);

I'm reasonably sure that the problem comes in on the first line of
content that includes a serialized data string.  Also, I've used this
same SQL data to import through other programs such as PHPMyAdmin, so
I know it's not a fundamental problem with the data itself.

I've tried using the Sanitize class to escape the text, but that
escapes everything, and nothing is executed.

Any guidance in this area would be appreciated.  Either in alternate
methods to load in the SQL data dump, or basic philosophical changes
in how I approach this problem.

Thanks!
Casey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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