Notice: Undefined index: id in /home/goldend1/public_html/crossbow.php on line 56

Notice: Undefined index: sub_categories_count in /home/goldend1/public_html/crossbow.php on line 78

Notice: Undefined index: parent in /home/goldend1/public_html/crossbow.php on line 78

Notice: Undefined index: level in /home/goldend1/public_html/crossbow.php on line 96

Notice: Undefined index: id in /home/goldend1/public_html/crossbow.php on line 132

Notice: Undefined index: id in /home/goldend1/public_html/crossbow.php on line 151
/home/goldend1/public_html/crossbow.php 162
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND p2c.category_id = c.id
                        ANd c.is_show = 1) a, 
      ' at line 5

SELECT a.title category_title, a.id category_id, b.*
              FROM (SELECT c.title, c.id, p2c.product_id
                      FROM categories c, product2category p2c
                      WHERE c.parent =
                        AND p2c.category_id = c.id
                        ANd c.is_show = 1) a, 
                   (SELECT p2c.id item_id,
                           p.id, 
                           p.title as title, 
                           p.description, 
                           REPLACE(FORMAT(CONVERT(price, UNSIGNED), 0 ), ',', ' ') as price,
                      	   REPLACE(FORMAT(p.price_old, 0 ), ',', ' ') as price_old,
                           p.price pr, 
                           CONCAT('images/upload/',REPLACE(i.image,'.jp', '.thumb.jp')) as image,
                           image_x+8 image_x, image_y+9 image_y,
                           p2c.sort,
                           b.id brand_id,
                           b.title brand_title,
                           b.url brand_url,
                           b.image brand_image
                      FROM product2category p2c, categories c, brands b, product2brand p2b,
                           products p LEFT JOIN images i ON p.id = i.product_id AND i.is_main = 1
                      WHERE c.id =  
                       AND p2c.category_id = c.id
                       AND c.is_show = 1
                       AND p.id = p2c.product_id
                       AND p.id = p2b.product_id
                       AND b.id = p2b.brand_id
                       AND p.id IN (SELECT product_id
                                      FROM product2brand
                                      WHERE brand_id = 70 OR 70 = 0)) b
              WHERE a.product_id = b.id
              ORDER BY a.id, b.pr ASC