1054 - Unknown column 's.public_flag' in 'where clause'
select count(*) as total from orders o, orders_status s where o.customers_id = '314' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'
[TEP STOP]
It seems to be a common one, which many are currently struggling with. From what i can determine, this is nothing to do with any contributions.
Probable cause:
It seems that in at least the v2.2 RC2 version, there is a call to a field in the 'order_status' table, called 'public_flag'. In default installs however, this field is not created. The offending line of code is found around line 97 of accounts.php
The offending line:
CODE
$orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id desc limit 3");
The quick fix:
if you are able to access your DB is to run the sql statement:
CODE
alter table orders_status add public_flag int DEFAULT '1';
This will create the missing field in the order_status table and the world will be a happy place once more.
Unless anyone has any better ideas... :thumbsup:

