Hi there,
i’m coding a page to import a csv file into EE2 entries. I’m using the API to ensure data correctness.
Is there a limit on how fast you can input entries via the API call however? At the moment the script halt after the first new entry.
Before this code i’m checking to see if a record with the same data already exists. If not (NUM_ROWS == 0) then the submit_new_entry is fired. If complete it should loop around prepare the next data to be entered, next row of csv.
if ($query->num_rows == '0') {
if ($this->EE->api_channel_entries->submit_new_entry(13, $datasql) === FALSE)
{
print "An Error Occurred Creating the Entry";
} else {
$succes++;
}
} else {
$existed++;
}Does anybody have a clue?
Hi there,
have looked some further into this problem. And i think i have found something, hoping someone here can explain this a bit.
My script does multiple API submit_new_entry calls. These records are created but they contain a relationship.
After running the script with 4 entry’s 4 new articles are created. In the relationship dbase table only 1 new entry shows up.
And that relationship is of the LAST entry created.
Anybody got a clue? Somehow i’m missing some relationships. The REL_ID number is incremented by 4.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.