On Jan 24, 2008 11:14 AM, daphonz <[EMAIL PROTECTED]> wrote:
>
> 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.
>

Can you execute the same statements using LOAD DATA LOCAL INFILE?

--~--~---------~--~----~------------~-------~--~----~
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