I couldn't import flexinode data. Flexiconvert makes all the steps ok, but finally it says "0 items inserted, Boo".

In the Line 102, the code:

$sql = "insert into {$cck_table} (nid, vid) value ('$nid', '$vid')";

.. use the keyword VALUE in singular. This syntax is present in at least versions 5.0.16 - 5.0.19. An earlier MySQL version (4.0.22) and other databases (PostgreSQL 8.x, Firebird 1.5) rejected this syntax.

Because I'm using MySQL database 4.0.27 , i've changed VALUES to VALUE, as follows:

$sql = "insert into {$cck_table} (nid, vid) value ('$nid', '$vid')";

And now works.

Thanks a lot to the module developers, because CCK it's really important, and flexinode users couldn't take the way to version 5.1

CommentFileSizeAuthor
#5 flexiconvert_values.patch486 bytesanarcat

Comments

JStarcher’s picture

Version: 5.x-0.2 » 4.7.x-0.2
Assigned: Unassigned » JStarcher
Status: Active » Reviewed & tested by the community
Steve Simms’s picture

I ran into the same thing on PostgreSQL.

Note that I think tsaorin mistyped when he posted the issue -- "value" should become "values", rather than the other way around. Then it'll work on any SQL database.

So, the line should read:

$sql = "insert into {$cck_table} (nid, vid) values ('$nid', '$vid')";

aaron’s picture

again, for db_prefixes, this needs to be:

$sql = "insert into {" . $cck_table . "} (nid, vid) values ('$nid', '$vid')";
starbow’s picture

Status: Reviewed & tested by the community » Active

This is a lot more likely to get rolled into a future version you provide an actual patch, rather than a description to the necessary changes.

For instructions on how to do this, see: http://drupal.org/patch/create

anarcat’s picture

Version: 4.7.x-0.2 » 4.7.x-1.x-dev
Status: Active » Reviewed & tested by the community
StatusFileSize
new486 bytes

Trivial patch rerolled.