Jump to content
thirty bees forum
  • 0

Undefined "checkedFrom" error BO - SQL Manager


Question

Posted

When I create queries in the BO SQL I always get the error "Undefined "checkedFrom" error". The same error with newly installed TB shops or a PS migration. Even with different query attempts.

EDIT: if i use another präfix - > error - table does not exist

0_1512763935504_Screenshot-2017-12-8 SQL Manager Edit • Lady Dee´s Gradient Yarn.png

11 answers to this question

Recommended Posts

  • 0
Posted

for example:

SELECT oi.idorder, oi.idorderinvoice, ROUND(oi.totalproducts,2) as article, ROUND(oi.totalpaidtaxexcl,2) as totalnetto, ROUND(oi.totalshippingtaxexcl,2) as shippingtaxexcl, ROUND(oi.totalpaidtaxincl,2) as totalpaidtaxincl, ROUND((oi.totalpaidtaxincl - oi.totalpaidtaxexcl),2) as totaltax, ROUND(((oi.totalpaidtaxincl - oi.totalpaidtaxexcl)/oi.totalpaidtaxexcl)*100, 0) as tax, DATE_FORMAT(oi.date_add, '%d.%m.%Y') as invoice_date, c.firstname, c.lastname FROM ps_order_invoice oi JOIN ps_orders o on oi.id_order = o.id_order JOIN ps_customer c on o.id_customer = c.id_customer JOIN ps_order_state_lang os ON (o.current_state = os.id_order_state) WHERE os.id_lang = 1 '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' AND o.invoice_date BETWEEN '.$this->getDate().' ORDER by oi.id_order_invoice ASC

migrate shop from ps prefix ps_ new installation tb prefix tb_

  • 0
Posted

In my old PS 1.6.1.1 the queries work.

Here is another query:

SELECT oi.id_order, oi.reference, ROUND(oi.total_paid_tax_incl,2) as totalpaidtaxincl, DATE_FORMAT(oi.date_add, '%d.%m.%Y') as order_date, o.current_state, os.name as order_state, oi.id_customer, c.firstname, c.lastname from ps_orders oi JOIN ps_orders o on oi.id_order = o.id_order JOIN ps_customer c on o.id_customer = c.id_customer JOIN ps_order_state_lang os ON o.current_state = os.id_order_state WHERE os.id_order_state = 1 OR os.id_order_state = 3 OR os.id_order_state = 8 OR os.id_order_state = 9 OR os.id_order_state = 10 OR os.id_order_state = 11 OR os.id_order_state = 13 OR os.id_order_state = 16 AND os.id_lang = 1 ORDER by oi.date_add ASC

PS save this query: 0_1512767788708_Screenshot-2017-12-8 SQL-Abfragen • FashionMoon.png

on TB not: 0_1512767818508_Screenshot-2017-12-8 SQL-Abfragen Bearbeiten • Lady Dee´s Gradient Yarn-1.png

  • 0
Posted

@mdekker ............ Are you already married to TB?

This is not only good, more to say PERFECT. Absolutely cool, it works with saving the queries. It's like Christmas - laugh.

Very good performance

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...