according to the manual " The optional second argument result_type in mysql_fetch_array() is a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH. This feature was added in PHP 3.0.7. MYSQL_BOTH is the default for this argument.
By using MYSQL_BOTH, you'll get an array with both associative and number indices. "
Check phpinfo() to see what version of PHP you are using.
THEN check that your array[keys] are EXACTLY like your db column names. ESPECIALLY caps/lowercase, etc.
As alternative try an explicit select
SELECT product, id FROM....