|
|||
|
Bei wem dieser Fehler auftritt, de bekommt hier eine Lösung.
Ich mache das mal anhand eines Beispiels: Fehlermeldung: 1054 - Unknown column 'p.products_id' in 'on clause' in diesem Fall kommt der Fehler aus der product_reviews_info.php Wer den Fehler hat, ersetzt in der Zeile 33 mit dem Inhalt $reviews_query = xtc_db_query("select r.products_id, rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from ".TABLE_REVIEWS." r, ".TABLE_REVIEWS_DESCRIPTION." rd left join ".TABLE_PRODUCTS." p on (r.products_id = p.products_id) left join ".TABLE_PRODUCTS_DESCRIPTION." pd on (p.products_id = pd.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."') where r.reviews_id = '".(int) $_GET['reviews_id']."' and r.reviews_id = rd.reviews_id and p.products_status = '1'"); zu dem hier: $reviews_query = xtc_db_query("select r.products_id, rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from (((".TABLE_REVIEWS." r, ".TABLE_REVIEWS_DESCRIPTION." rd) left join ".TABLE_PRODUCTS." p on (r.products_id = p.products_id)) left join ".TABLE_PRODUCTS_DESCRIPTION." pd on (p.products_id = pd.products_id and pd.language_id = '".(int) $_SESSION['languages_id']."')) where r.reviews_id = '".(int) $_GET['reviews_id']."' and r.reviews_id = rd.reviews_id and p.products_status = '1'"); Zur Allroundlösung bei ähnlichen 1054 - Probleme: Ich habe (rot markiert) einfach Klammern gesetzt. Bei vergleichbaren Scripts sollte dies genauso funktionieren. Wer sich etwas mit SQL-Scripts auskennt sollte mit etwas Verstand die Logik verstehen die hinter den Klammern steht. Wer Probleme hat, kann seine Scriptzeile hier reinwerfen, mal gucken ob es dann auch funktioniert, wenn ich dafür dann eine Hilfe gebe. |
|
|||
|
Schade diese Lösung funktioniert bei mir nicht, obwohl ich auch diese 1054 Fehlermeldung seit neustem habe.
Einfach mal in meinem Shop auf eine Kategorie klicken oder die Suche benutzen. Woran liegt es? Dieser Fehler tritt erst seit kurzem auf. |
|
|||
|
Code:
1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p.products_fsk18!=1 and p2c.categories_id = '21' ORDER BY pd.products_name ASC [XT SQL Error] |
|
|||
|
select count(p.products_id) as total from (((products_description pd, products p) left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c) left join specials s on p.products_id = s.products_id) where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and p.products_fsk18!=1 and p2c.categories_id = '21' ORDER BY pd.products_name ASC
Bitte das mal da einfügen bzw. die alte Abfrage rausnehmen und das hier dafür einsetzen und testen
|
|
|||
|
schau doch mal in der adressleiste bei welcher php-Datei der Fehler angezeigt wird...dann öffnest du diese datei und schaust nach, wo sich denn da überall SQL-Abfragen befinden...Diese markierst du mal und postest hier rein...SQL-Abfragen beginnen zumeist mit SELECT.
Manchmal sind in einer Datei mehrere drinne...kipp mal alles hier rein, ich passe dir das dann an
|
|
|||
|
wenn ich auf eine Kategorie klicke .... erscheint diese Adresse im Browser:
http://www.elmadera.de/index.php?cPath=20 siehe unter www.elmadera.de |
|
|||
|
$category_depth = 'top';
if (isset($cPath) && xtc_not_null($cPath)) { $categories_products_query = xtc_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); $cateqories_products = xtc_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = xtc_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'"); $category_parent = xtc_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } |
![]() |
| Lesezeichen |
| Stichworte |
| 1054, allroundlösung, error, gefunden |
| Themen-Optionen | |
| Ansicht | |
|
|