Post by kellytay » Thu Jul 26, 2012 2:51 pm

Hello All,

I am have a minor issue which is below I can't seem to display 'city' in my sql database there appears to be an error.

Support in this matter is greatly appreciated. Thanks :) :)

Notice: Error: Unknown column 'city' in 'field list'
Error No: 1054
INSERT INTO address SET customer_id = '4', firstname = 'jjjjjjj', lastname = 'ssssss', company = '', company_id = '', tax_id = '', address_1 = 'PO Box 0000', address_2 = '', city = 'Glory', postcode = '0000', country_id = '13', zone_id = '195' in /home/catalog/public_html/shop/system/database/mysql.php on line 49

New member

Posts

Joined
Mon Jan 17, 2011 9:40 pm

Post by i2Paq » Thu Jul 26, 2012 6:03 pm

This happens when?

What did you changed as this does not happen just like that?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by kellytay » Thu Jul 26, 2012 8:08 pm

I don't know but I will keep checking for a solution. :)

New member

Posts

Joined
Mon Jan 17, 2011 9:40 pm

Post by straightlight » Thu Jul 26, 2012 11:50 pm

You may of had upgraded from an earlier version of OpenCart which the city field from the address table on the database may of had failed on being created during the process and when you either access the admin - > sales - > customers page or from the store-front end during the customer registration form and wish to submit the form, this error comes up.

To fix this, go to your PHPMyAdmin, under your OpenCart database and execute the following SQL statement under the SQL tab:

Code: Select all

ALTER TABLE `oc_address` ADD `city` varchar(128) COLLATE utf8_bin NOT NULL;
Note: Replace oc_ with your real table prefix name if it's named differently. Then, try to reproduce the action either from the admin or from the customer registration form.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 144 guests