I have 2 tables. The same query works fine with one table but doesn't work with the other one.
Query which works fine:
$qry="insert into table_a (product_id, image_name) VALUES ('$a1', '$name1')";
$result = @mysql_query($qry);
Query which is not inserting data into the table:
$qry=("insert into subtable(product_id, title, desc) VALUES ({$a1}, {$a2}, {$a3})");
$result = @mysql_query($qry);