My problem is that when viewing the database using Navicat (mysql administration tool) I expect the field to look like
imgB.jpg when it ends up looking like
imgA.jpg (the square shape is in between Dog and Monkey). Why is this square shape showng up? I have tried all sorts of trim, n12br, etc... to clean the new name, but it always shows and messes up the \n as well...
Basically, what i am doing is adding a new line item to a text field (which is later used to create a dropdown menu) then sorting it and updating that database entry.
To simplyfy things, here's my code:
PHP Code:
$options = array(
[0] => 'Cat',
[1] => 'Monkey',
[2] => 'Snake'
);
$newname = 'Dog';
$options[] = trim($newname);
asort($options);
$newoptions = implode("\n", $options);
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "ppgal_customfields
SET options = '" . $vbulletin->db->escape_string($newoptions) . "'
WHERE fieldid = " . $vbulletin->options['erc_gallery_customfieldid_artists'] . "
");
If anyone knows what I am forgetting to do, or doing wrong - please please please tell me
Thanks!