Search Results

Search found 4 results on 1 pages for 'user345426'.

Page 1/1 | 1 

  • MOD Rewrite Mask for Image URL

    - by user345426
    Okay so I am launching a cloned e-commerce site. I want to create a rewrite rule for the image folder for the second site to fetch images from the first site. RewriteRule ^alice.gif$ www.rhinomart.com/images/h_home.gif When I go to alice.gif directly through the browser it simply redirects me to the rhinomart.com URL and image. How do I prevent the redirect from occurring? When I go to http://www.acnbiz.net/alice.gif it should fetch alice.gif directly from Rhinomart.com/images and not redirect. is it possible???

    Read the article

  • SELECT SUM PHP MySQL problem

    - by user345426
    This is driving me nuts! Below you will find my PHP/MySQL code but I will post the direct mySQL statement here: SELECT SUM( ot.value ) AS msa FROM orders o LEFT JOIN orders_total ot ON ot.orders_id = o.orders_id WHERE ot.class = 'ot_total' AND UNIX_TIMESTAMP( o.date_purchased ) >=1262332800 AND UNIX_TIMESTAMP( o.date_purchased ) <=1264924800 AND o.sales_rep_id = '2' When I execute this statement inside of phpMyAdmin I get the sum for ot.value which is associated to "msa". Although, when I run my php code it does not return a value. Anyone see the problem? // works in phpMyAdmin but not displaying during PHP execution! $monthly_sales_amount_sql = "SELECT SUM(ot.value) AS msa FROM orders o LEFT JOIN orders_total ot ON ot.orders_id = o.orders_id WHERE ot.class = 'ot_total' AND UNIX_TIMESTAMP(o.date_purchased) >= $start_timestamp AND UNIX_TIMESTAMP(o.date_purchased) <= $end_timestamp AND o.sales_rep_id = '" . $sales_rep_id "'"; $result = mysql_query($monthly_sales_amount_sql); $row = mysql_fetch_assoc($result); echo "MSA: " . $row['msa'] . "<BR><BR>";

    Read the article

  • Anything wrong with this MySQL quert? takes 10 seconds+ to load

    - by user345426
    I have a search that is taking 10 seconds+ to execute! Keep in mind it is also searching over 200,000 products in the database. I posted the explain and MySQL query here. 1 SIMPLE p ref PRIMARY,products_status,prod_prodid_status,product... products_status 1 const 9048 Using where; Using temporary; Using filesort 1 SIMPLE v ref PRIMARY,vendors_id,vendors_vendorid vendors_vendorid 4 rhinomar_rhinomartnew.p.vendors_id 1 1 SIMPLE s ref products_id products_id 4 rhinomar_rhinomartnew.p.products_id 1 1 SIMPLE pd ref PRIMARY,products,prod_desc_prodid_prodname prod_desc_prodid_prodname 4 rhinomar_rhinomartnew.p.products_id 1 1 SIMPLE p2c ref PRIMARY,ptc_catidx PRIMARY 4 rhinomar_rhinomartnew.p.products_id 1 Using where; Using index 1 SIMPLE c eq_ref PRIMARY PRIMARY 4 rhinomar_rhinomartnew.p2c.categories_id 1 Using where MySQL Query: select p.products_id, p.products_image, p.products_price, p.products_weight, p.products_unit_quantity, s.specials_new_products_price, s.status, pd.products_name, pd.products_img_alt from products p left join vendors v ON v.vendors_id = p.vendors_id left join specials s on s.products_id = p.products_id left join products_description pd on pd.products_id = p.products_id left join products_to_categories p2c on p2c.products_id = p.products_id left join categories c on c.categories_id = p2c.categories_id where ( ( pd.products_name like '%apparel%' ) or p2c.categories_id IN (773, 132, 135, 136, 119, 122, 124, 125, 126, 1749, 1753, 1747, 123, 127, 130, 131, 178, 137, 140, 164, 165, 166, 167, 168, 169, 832, 2045 ) or p.products_id = 'apparel' or p.products_model = 'apparel' or CONCAT(v.vendors_prefix, '-') = 'apparel' or CONCAT( v.vendors_prefix, '-', p.products_id ) = 'apparel' ) and p.products_status = '1' and c.categories_status = '1' group by p.products_id order by pd.products_name

    Read the article

  • SQL Query taking too long

    - by user345426
    I am trying to optimize the SQL query listed below. It is basically a search engine code that retrieves products based on the products name. It also checks products model number and whether or not it is enabled. This executes in about 1.6 seconds when I run it directly through the phpMyAdmin tool but takes about 3 seconds in total to load in conjunction with the PHP file it is placed in. I need to add a category search functionality and now that is crashing the MySQL server, HELP! SELECT DISTINCT p.products_id , p.products_image , p.products_price , s.specials_new_products_price, p.products_weight , p.products_unit_quantity , pd.products_name , pd.products_img_alt , pd.products_affiliate_url FROM products AS p LEFT JOIN vendors v ON v.vendors_id = p.vendors_id LEFT JOIN specials AS s ON s.products_id = p.products_id AND s.status = 1, categories AS c , products_description AS pd , products_to_categories AS p2c WHERE ( ( pd.products_name LIKE '%cleaning%' AND pd.products_name LIKE '%supplies%' ) OR ( p.products_model LIKE '%cleaning%' AND p.products_model LIKE '%supplies%' ) OR p.products_id = 'cleaning supplies' OR v.vendors_prefix = 'cleaning supplies' OR CONCAT( CAST(v.vendors_prefix AS CHAR), '-', CAST(p.products_id AS CHAR) ) = 'cleaning supplies' ) AND p.products_status = '1' AND c.categories_status = '1' AND p.products_id = pd.products_id AND p2c.products_id = pd.products_id AND p2c.categories_id = c.categories_id ORDER BY pd.products_name

    Read the article

1