The main problem is to formulate the correct query, \'$ select_sentence\' which I am using takes the last value of the new price \'New Price\' in the base db and places it in al