views:

12

answers:

0

Here is my procedure...

DELIMITER $$
CREATE PROCEDURE syncSites(IN m_id INT, IN p_aux VARCHAR(2), 
                           IN c_aux VARCHAR(2), IN price_override VARCHAR(8))
    BEGIN
    INSERT INTO product SELECT
    m_id,
    product_id,
    product_name,
    IF(price_override IS NULL OR price_override = '', price, price_override)
    FROM product WHERE merchant_id = 1 AND product_id = 47209;
    END
$$
DELIMITER;

So I'm going to pass in a table column name (flex_15) as the price_override param, but then price_override is the literal value 'flex_15' rather than the interpreted as the name of the column which might have a value of 9.99 for example. So Ultimately I want the value of flex_15 (9.99) to be accessible, is this possible?