Don't think its a good idea to misuse the resource-fields like that.
I would rather use TVs for your special fields.
And:
Is there a special reason you are using runProcessor and not newObect() + save() ?
Anyway, does this work?
<?php
mysql_connect(localhost, x, x);
$result = mysql_query('SELECT * FROM x.x');
while ($row = mysql_fetch_array($result)) {
$fields = array(
'pagetitle' => $row['name'],
'description' => $row['thumb'],
'menutitle' => $row['price'],
'longtitle' => $row['phone_url'],
'link_attributes' => $row['color'],
'introtext' => $row['picture'],
'content' => $row['description'],
'template' => 2,
'parent' => $parent,
'published' => 1
);
$responses[] = $modx->runProcessor('resource/create', $fields);
}
I almost never disagree with Bruno17, but I often recommend using Resource fields for this, if you're sure you won't need them for their original purpose, because the searching and sorting is so much faster and easier. Be sure to check the lengths of those fields in the DB and make sure you're not trying to put anything in them that won't fit.
I also prefer using the resource/create processor when possible because I think it does a better job of setting the default values of all Resource fields and related objects and does a better job of handling and reporting errors. It also helps you make sure an upgrade to MODX won't mess anything up.
It is possible, BTW, to set TV values with the resource/create processor, though it's tricky (see the NewsPublisher class code).