Why is this code causing an SQL error?
This is your current query as it's executed:

SELECT 
FROM 
{pricepackages} pricepackages


Which is obviously wrong; an SQL SELECT query needs one or more fields. To SELECT *:

$query = db_select('pricepackages')-&gt;fields('pricepackages')-&gt;execute();     


Or specific fields:

$fields = array('foo', 'bar');
$query = db_select('pricepackages')-&gt;fields('pricepackages', $fields)-&gt;execute();