How do I write a query using Drupal 7's query builder to return all the fields (SELECT *), not just the ones I specify through ->fields.
Edit: I tried something like
$query = db_select('table') ->condition('id', 2);
but when i echo it it's something like:
SELECT FROM {table} table WHERE (id = :db_condition_placeholder_0)
I haven't tested the query but my thoughts are the it will not work cause there is no * after SELECT.
$id = 1; $results = db_query('SELECT * FROM table WHERE someId = :myId', array(':myId' => $id));
– Galitea