tries to do relating it directly data in the tables color and colorinfo but he is very extensive,
also "size" in the module admin/IMPORT but ...
Q031; Q031; 1.000; gramo; 0.104347; "color1,color2,color3"; ; ; 1; 2; 1; cordones/q031t.jpg; cordones/q031d.jpg;short ; long; 2
.....
it adds the values, but without "newid" in "size" table, and not them load within the description of items.. :(
somebody can helpme?????
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
126 (126; 20.869565 US; neu; Column count doesn't match value count at row 1 Column count doesn't match value count at row 1 uno Column count doesn't match value count at row 1 dos )
some idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
db_query("INSERT into color values('%','$nitemID', '$data[6]', '$data[7]','$newid')") or db_die();
$color_res = db_query("select ID from color where newid='$newid'") or db_die();
$color_row = db_fetch_row($color_res);
$colorinfo_array = explode(",", $data[5]);
foreach($colorinfo_array as $colorinfo_row) {
db_query("INSERT into colorinfo values('%', '$color_row[0]', '$nlangID', '$colorinfo_row')") or db_die();
echo "$colorinfo_row ";
}
echo ")\n";
db_query("update color set newid='0' where ID='$color_row[0]'") or db_die();
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Modify both INSERT-queries and set column names:
INSERT INTO color (itemID, newid) VALUES ($nitemID, $newid)
INSERT INTO colorinfo (colorID, langID, value) VALUES ($color_row[0], $nlangID, $colorinfo_row)
In original script $data[5] - [7] contain values for first property (sizes). You should add your color values at the of the line.
$colorinfo_array = explode(",", $data[16]);
Otherwise all indexes in import script have to be modified.
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
tries to do relating it directly data in the tables color and colorinfo but he is very extensive,
also "size" in the module admin/IMPORT but ...
Q031; Q031; 1.000; gramo; 0.104347; "color1,color2,color3"; ; ; 1; 2; 1; cordones/q031t.jpg; cordones/q031d.jpg;short ; long; 2
.....
it adds the values, but without "newid" in "size" table, and not them load within the description of items.. :(
somebody can helpme?????
You have to 'copy' the lines for importing size and sizeinfo only and replace 'size' with 'color':
admin/importitem.inc.php lines 48-57 and 71-83.
Greetings,
Andreas.
return error:
126 (126; 20.869565 US; neu; Column count doesn't match value count at row 1 Column count doesn't match value count at row 1 uno Column count doesn't match value count at row 1 dos )
some idea ?
db_query("INSERT into color values('%','$nitemID', '$data[6]', '$data[7]','$newid')") or db_die();
$color_res = db_query("select ID from color where newid='$newid'") or db_die();
$color_row = db_fetch_row($color_res);
$colorinfo_array = explode(",", $data[5]);
foreach($colorinfo_array as $colorinfo_row) {
db_query("INSERT into colorinfo values('%', '$color_row[0]', '$nlangID', '$colorinfo_row')") or db_die();
echo "$colorinfo_row ";
}
echo ")\n";
db_query("update color set newid='0' where ID='$color_row[0]'") or db_die();
}
Seems copy was not enough :-(
Modify both INSERT-queries and set column names:
INSERT INTO color (itemID, newid) VALUES ($nitemID, $newid)
INSERT INTO colorinfo (colorID, langID, value) VALUES ($color_row[0], $nlangID, $colorinfo_row)
In original script $data[5] - [7] contain values for first property (sizes). You should add your color values at the of the line.
$colorinfo_array = explode(",", $data[16]);
Otherwise all indexes in import script have to be modified.
Greetings,
Andreas.