query-builder Questions
1
Solved
I'm currently working on a Service in SF2 that queries the database with the QueryBuilder using a class variable set with a repository-specific QueryBuilder in the constructor of this Service.
Whi...
Accelerate asked 12/12, 2013 at 15:43
3
Solved
Here is my problem.
I use the buildForm method on symfony 2.1 in order to build my form.
With the following code everything works just fine :
$builder->add('combat','entity',array(
class' =>...
Separates asked 4/3, 2013 at 0:32
1
Solved
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')...
Rhapsodize asked 30/10, 2013 at 13:20
2
I have a problem with Laravel 4 query builder, i want make a re-usable method
public function getData($where=array())
{
// $where = array('city' => 'jakarta', 'age' => '25');
return User::...
Penney asked 8/10, 2013 at 17:58
2
Solved
I want to put my entity in the function of the query builder:
->add( 'weeks', 'entity', array(
'class' => 'MV\CaravanBundle\Entity\CaravanRow',
'property' => 'line',
'query_builder' =&...
Abbottson asked 12/12, 2012 at 19:16
1
Solved
How to make a query to get random() rows with limit of 3 rows?
I tried but get error:
myQueryBuilder.orderBy("random()", true);
Obsequent asked 12/7, 2013 at 13:28
2
Solved
I'm new with Symfony2 and I built successfully my first join through QueryBuilder and Doctrine 2.
Probably this is a stupid question but both on-line and in the Symfony2's methods I was unable to f...
Unstrung asked 2/7, 2013 at 9:58
4
Solved
I've got the following query that returns 2 records (in DataSet's query builder)
SELECT EmpID, Name, id
FROM Users
WHERE (CAST(id AS Varchar(20)) IN ('5688','5689'))
Now if I do the same query p...
Giotto asked 29/4, 2012 at 17:6
1
Solved
When using the following only the last where is added to my query;
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->select(array('qi'))
->from('Table:Qi', 'qi')
->wher...
Bugle asked 8/3, 2013 at 18:32
3
I have the following (exemplary) query:
SELECT *
FROM User u
LEFT JOIN section_user su ON (su.user_id = u.id AND su.section_id = 3)
WHERE section_id is null
I am trying to rebuild it in Symfony2...
Khiva asked 17/1, 2013 at 20:45
2
Solved
I have my two classes User and Role, and I need to make a QueryBuilder which returns a query for the users who have the ROLE_PROVIDER role. I need this for an entity form field in Symfony 2. In the...
At asked 14/4, 2012 at 0:25
1
Solved
I have a project in Symfony2 which works good at my localhost, but after moving it to external server problem has started.
I don't see any results names from database which contains polish chara...
Ibis asked 15/11, 2012 at 14:47
1
I'm using Doctrine createQueryBuilder() to construct queries in Symfony2. But, I don't want to take all columns in this entity. How can I select only the ID and Name?
$query = $this->getEntityM...
Parfitt asked 22/9, 2012 at 12:15
2
Solved
Similar to
select count(*) from tablename;
what should be query in ORMLITE
i tried something like
int total = dao.queryBuilder().("select count(*)");
Pretext asked 4/9, 2012 at 9:43
3
I know I have a syntax isse here however I cant figure it out. I'm trying to do a SELECT and INNER JOIN of 5 tables but Symfony is complaining about the Entities in the JOIN are used before being d...
Knapsack asked 22/2, 2012 at 16:58
1
Solved
What is the best way for querying by using the value of foreign object's field?
Suppose I have these three classes.
UnitResult class which describes amount of Units:
@DatabaseTable
public class ...
Berniecebernier asked 20/6, 2012 at 11:17
2
Solved
i have a big query (in my query builder) and a lot of left joins. So i get Articles with their comments and tags and so on.
Let's say i have the following dql:
$dql = 'SELECT blogpost, comment, ta...
Raby asked 22/5, 2012 at 12:10
1
Solved
How can I implement the following query with Query Builder?
SELECT *
FROM t
WHERE t.status = 1
OR EXISTS(SELECT *
FROM r
WHERE r.t_id = t.id
AND r.status = 1
)
The part without exist c...
Wardieu asked 5/4, 2012 at 14:28
2
Solved
I need to perform this query:
SELECT * FROM (SELECT * FROM product WHERE car = 'large' ORDER BY onSale DESC) AS product_ordered GROUP BY type
In Symfony2 using the entity manager.
My basic quer...
Naughton asked 8/3, 2012 at 17:26
1
Solved
I'm using the SQL Express 2010 query builder. I need to be able to increment a field.
In my behind code, I make a call such as
tableAdapter.IncrementLikeCount(id);
If I just use an increment, t...
Byrnes asked 3/2, 2012 at 22:42
1
Solved
I'm trying to get all comments for each post in my home page
return
$this->createQueryBuilder('c')
->select('c')
->from('Sdz\BlogBundle\Entity\Commentaire' ,'c')
->leftJoin('a.comme...
Boyne asked 6/11, 2011 at 23:48
1
Solved
My query is doctirne 2. i have a status field in users, private or
public. i want to be able to run this query and display all comments
where status= public and private only if userid = current...
Alkalinize asked 10/10, 2011 at 17:46
1
Solved
I am using MySQL Workbench. I can't deny that it's a very good tool. Unfortunately it doesn't have a query builder feature. So I wonder if there is another one that has a query builder featur...
Curnin asked 16/9, 2011 at 2:38
1
Solved
How can I write a query with ormlite instead of using .create or any other thing like that? Can you please show me how for this simple example :
SELECT name FROM client
EDIT since I can't answe...
Ocampo asked 10/8, 2011 at 18:58
1
Solved
I am having an issue with creating queries with javax.persistence.criteria.CriteriaBuilder. I am using EclipseLink 2.1 and an Oracle 10g database. When building a query with multiple restrictions i...
Absorption asked 4/7, 2011 at 0:9
© 2022 - 2024 — McMap. All rights reserved.