Forum: SQL |
Thema:
Abfrageproblem |
Von:
G. Guest (
19.01.2005 18:33) |
<?php
$sql = db_query("SELECT p_id,
p_item_nr,
p_name,
p_style,
p_price,
p_sp_price,
p_show_me,
p_show_img,
p_has_special,
p_has_style,
s2_style2,
s2_has_style2,
c_name
FROM ". DB_PREFIX ."products,
". DB_PREFIX ."categories,
". DB_PREFIX ."products_style2,
". DB_PREFIX ."products_categories
WHERE p_id = product_id
AND category_id = c_id
ORDER BY c_id, p_item_nr
LIMIT ". $start .",". $rows_per_page
");
?>
Hallo mit vorstehendem Sript versuche ich aus 4 Tabellen Daten laden.Es wird aber nichts angezeigt.Nichteinmal eine Fehlermeldung! Ich habe Das Script etwas abgewandelt:Hier mal das Original:
PHP-Quellcode:
<?php
$sql = db_query("SELECT p_id,
p_item_nr,
p_name,
p_style,
p_price,
p_sp_price,
p_show_me,
p_show_img,
p_has_special,
p_has_style,
c_name
FROM ". DB_PREFIX ."products,
". DB_PREFIX ."categories,
". DB_PREFIX ."products_categories
WHERE p_id = product_id
AND category_id = c_id
ORDER BY c_id, p_item_nr
LIMIT ". $start .",". $rows_per_page
);
?>
Muß ich in der WEHRE Klausel auch eine Abfrage einbauen oder kann ich die einfach weglassen (in Bezug auf die 4 Tabelle)?
Danke schon mal
--
www.die-bastler.de
www.aajiha.com
Betreff |
Von |
Datum |
|
|
Sven
Buhk
|
20.01.2005 13:38 |
|
|
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!