Oh, sorry, I misunderstood your initial reply.
So to properly answer you: yes. The SQL syntax works when directly
loaded through the command line or PHPMyAdmin.
When I remove any INSERT data that contains serialized content, my
initial system works just fine, and the SQL file is successfully
loaded into the MySQL server.
But when I try to use it to insert a line like:
INSERT INTO `categories`
(`id`,`parent_id`,`slug`,`name`,`teaser`,`description`,`model`,`options`,`ordering`,`lft`,`rght`,`enabled`,`type`,`level`,`created`,`modified`)
VALUES ('2','0','file-repository','File Repository','<p> </
p>',NULL,'Document','a:1:{i:0;s:
1:\"0\";}','1','3','4','true','nested',NULL,'2007-11-01
17:33:17','2007-11-01 17:33:17');
And run it with query(), rawQuery(), or execute(), the system fails.
I'm pretty sure it's related to those additional semi-colons in the
serialized content.
Thanks for your continued assistance.
-Casey
On Jan 24, 2:32 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> On Jan 24, 2008 1:46 PM, daphonz <[EMAIL PROTECTED]> wrote:
>
>
>
> > I may not understand the LOAD DATA LOCAL INFILE fully, but doesn't
> > that require special security access?
>
> If you have shell access to the database you can use this command to
> load the data into a table. One needs to have the "FILE privilege"
> unless "LOCAL" is used. See here for all the dirty details:
>
> http://dev.mysql.com/doc/refman/5.0/en/load-data.html
>
> Alternatively (because i'm not entirely sure what you have in your
> file--raw data or SQL statements) you can connect to mysql from a
> shell and use this syntax:
>
> \. /path/to/your/file
>
> > I'm trying to get this system
> > to work off of a generic apache server out-of-the-box.
>
> I realise that. What i mean is, can the statements in the file be run
> against a database without errors when doing so directly (ie. without
> PHP)? If you can't get shell access, can you load the contents of the
> file using PHPMyAdmin? The point is to ensure that your SQL syntax is
> ok to begin with.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---