3,046 questions
0
votes
1
answer
108
views
How do I join and select from a many-to-many relation?
I have tables Properties and Features with many-to-many relationship PropertiesFeatures (which holds their IDs):
When I select multiple features (feature IDs) as an array, I need all properties which ...
1
vote
3
answers
83
views
TYPO3 QueryBuilder: Howto handle fieldName calculations?
(TYPO3 v11)
There is a table of events. Each event has a datetime_end field and a days_until_deletionfield. A scheduler script should delete old events automatically.
In SQL this works:
UPDATE `...
0
votes
0
answers
50
views
Resolver returning object instead of array causes type error in objectType field
It seems like the objectType I'm using expects the resolver to return an array, but my data is an object with metadata and an array inside (items).
I'm a bit confused about how objectType works in ...
1
vote
1
answer
160
views
Adding a custom operator in react-querybuilder and json-logic
I'm trying to add a custom operator to my react-querybuilder project, but it's just not working.
I've added the following custom operators to my builder:
const customOperators = [
{
name: '...
0
votes
0
answers
142
views
Creating Custom Value Editor in React - Query Builder
I am using this React Query Builder library and I wanted to know if I can use my custom-value editor such that I can have 2 inputs for a single field.
For Example -
Let say my field name is Full Name -...
0
votes
2
answers
77
views
Prevent Operator Reset When Changing Field in jQuery QueryBuilder
I'm using jQuery QueryBuilder, and I noticed that when changing the left-hand side field, the operator resets automatically. I understand this is built-in behavior since different fields may support ...
0
votes
1
answer
176
views
jQuery QueryBuilder & Bootstrap5 tooltips not displaying correctly
I'm using jQuery-QueryBuilder (v3 via CDN) along with the current Bootstrap 5. If I enable the built in tooltip plugin the the tooltip only displays as [Object.object] rather than the expected error ...
0
votes
0
answers
30
views
Unable to get old and new rule id on dragNdrop
import { QueryBuilderDnD } from '@react-querybuilder/dnd';
import * as ReactDnD from 'react-dnd';
import * as ReactDndHtml5Backend from 'react-dnd-html5-backend';
import { add, QueryBuilder, ...
-1
votes
1
answer
34
views
Symfony picking up wrong data based on condition in production
System data:
OS Ubuntu's Timezone: Asia/Tokyo(JST)
MySQL(RDS)'s Timezone: System
cron command
30 * * * * cd project && php bin/console command-name
Running the query builder from EM at the ...
0
votes
2
answers
62
views
Laravel Eloquent: Excluding Titles with Quizzes or Contests While Including Those with Practices
I'm working on a Laravel application and I need help with filtering titles based on their relationships with practices, quizzes, and contests. Specifically, I want to retrieve titles that have ...
1
vote
1
answer
23
views
Make CakePHP querybuilder wrap a subquery in parentheses
How do I wrap a subquery in extra parentheses?
$sub = new \Cake\Database\Query();
$sub
->select('b.value')
->from(['b' => 'other_table'])
->where(['b.key' => 'fancy_cars'])
;
$...
0
votes
0
answers
60
views
Issue with Route Parameter Not Applying in Backpack CRUDController
I'm encountering a strange issue in my CrudController when applying a base clause with a dynamic route parameter. I have a custom route like this:
Route::crud('box/{receive_order_id}/list', '...
0
votes
1
answer
64
views
Query builder Relation ManyToMany without the association entity
The context is a Symfony 6 project wired with Doctrine 3. I have a ManyToMany relation between Projet and Employe, and in the list page of the projects i want to display only the projects for whom the ...
2
votes
1
answer
103
views
Why does my Laravel Eloquent query return records with incorrect dates after applying a join with additional filters,despite initial date constraints?
I'm working with Laravel Eloquent to fetch records from a views table, filtering them by specific video_ids and created_at dates. I also need to join with another table devices to apply additional ...
1
vote
1
answer
111
views
How to Filter and Query Based on a Computed Column in Laravel?
I'm working on a Laravel project where I need to calculate an estimated_value for each record in my SalesLead model by multiplying the probability and value columns. I want to filter records based on ...
1
vote
0
answers
69
views
Laravel Pagination with Duplicate Grouping: Ensuring Consistent Result Count
Description
I am working on a Laravel project where I need to paginate products with certain filters and sort criteria. Some products are considered duplicates if they have the same type and website-&...
0
votes
1
answer
72
views
Laravel9 Spatie QueryBuilder in Job queue
I have a Job which runs in queue. There is a Spatie/QueryBuilder which should filter data through the filter which came with the request. I am sure the filter is in the queue as array and I also can ...
4
votes
0
answers
696
views
Is there a solid and maintained GraphQL query builder for TypeScript?
I'm looking for a GraphQL query builder library that is well maintained, with a nice DX and an active community around it (or backed by an active company).
I need to generate queries dynamically based ...
1
vote
1
answer
572
views
How to filter FieldSelector options in react-querybuilder
I am trying to remove the fields from FieldSelector which I have already used.
I have a custom component for FieldSelector lets say A, B, C, D, E are the total fields that are available in ...
1
vote
0
answers
65
views
Fetch Previous State In Gorm V2 Callback
I am trying to query for the previous state of the row in a callback.
I've registered the callback as such:
callback.Update().Before("gorm:save_before_associations").Replace("...
1
vote
1
answer
75
views
How to get the list of books that are not borrowed and in stock?
Can anyone help me solve my problem on querying available books? I don't want to allow a user to borrow books that are already borrowed or not yet returned and books that are out of stock based on the ...
0
votes
1
answer
653
views
Validator not working in react-querybuilder
I am using react-querybuilder. field validation is not working.
See this StackBlitz when you click on Rule and check all field there is no error on that.
export const fields = (
{
name: '...
0
votes
0
answers
19
views
Why isn't "nth-of-type" working for my blog query loop? [duplicate]
I've created a query loop to repeat blog posts but they all look the same. I want them the feature images to all have different sizes, border styles, padding etc. For the sake of simplicity, I'm just ...
0
votes
1
answer
177
views
Troubleshooting @ParamConverter Issue in Symfony
When calling a method in my controller, I encounter an issue with the @ParamConverter annotation in Symfony. The specific error I am facing is: App\Entity\Recipe object not found by the @...
0
votes
0
answers
259
views
Laravel tinker not working with error "resource is not a valid stream resource"
I'm working with Laravel tinker, but if I run some query builder, such as \Illuminate\Support\Facades\DB::table('users')->get();, I always get the following error messages without expected result:
...
0
votes
1
answer
135
views
CodeIgniter4 query builder script calling getRowArray() only returns 1 row
I am trying to execute this query from an active record script in CodeIgniter 4.
SELECT pres.db_pem, COUNT(*) AS Count FROM pres GROUP BY pres.db_pem;
I have try with
public function countall()
{
...
2
votes
1
answer
1k
views
How to add additional fields in React Query Builder?
I am trying to achieve the following: When a user enters a specific value, then additional fields are displayed, there the user can enter the values, also the values from this fields should be ...
1
vote
0
answers
809
views
Custom Field in React Query Builder
I am playing with an example taken from the docs and trying to create a custom field which shows an additional textbox and adds it to the built query.
import { useState } from 'react';
import type { ...
0
votes
3
answers
984
views
Laravel Eloquent Query group by user and order by Max(date)
I have the following table. I am actually designing a simple chat, so, we have the user_id (the person who sends the message) and user_id_to (the person who receives the message).
id
user_id
...
1
vote
3
answers
106
views
Laravel Eloquent - Query where secondValue if no results with initialValue
I have a model named Document, Document has a status field where the possible values are, let's say dummy_data ['done', 'failed', 'sent', ....].
I want to get all documents where status='done' if they ...
0
votes
1
answer
323
views
TypeORM "ERROR [ExceptionsHandler] for SELECT DISTINCT, ORDER BY expressions must appear in select list" when ordering by alias and using take & skip
I'm using NestJS with TypeORM and a Postgres Database.
I am calculating after how many km the car has to go to inspection the next time and using that value to order the list of cars, that I'm ...
2
votes
2
answers
2k
views
How can we implement autocomplete with API and multi-select in react-querybuilder?
I am building a search query builder with react-querybuilder and want to fetch the values of certain rules from an API. I also want the values field to be a filter and not just a dropdown, where users ...
0
votes
1
answer
73
views
Is there a fastest way to hydrate my table
I'm actually migrating datas using a Symfony command
Basically the goal is to select all my identities in my application (around 100,000 entries) and get the identity as well as the name in order to ...
0
votes
1
answer
93
views
PostgreSQL self join not working on TypeORM
My goal is to select users from USER table where userId = user_id_creator(who created the user, some users can create other users according to the user role)
I need to convert this Postgres SQL query ...
0
votes
0
answers
94
views
In the AEM Query Builder API is it possible to query the properties of a related resource?
We have some code in AEM that currently allows us to search a folder of content fragments and then interrogate nested content fragments based on their jcrName.
So, take for example a CF named "...
0
votes
0
answers
233
views
State persistence in react-query-builder
I'm using react-query-builder for my search page, I want to maintain the query state on the UI in the query builder.
Currently when the query gets completed and results are displayed on the next page, ...
1
vote
1
answer
125
views
Get all dates within a current month CakePHP 4 Query Builder
Trying to get all dates within a given month using CakePHP 4 Query Builder.
The following raw query works, and gets the correct dates. Dates are stored in the format Y-m-d
$connection = ...
0
votes
1
answer
162
views
Can't bind to 'ngModel' since it isn't a known property of 'query-builder' error in angular2-query-builder library
i am using angular2-query-builder library in my project. my angular cli version is 13.0.4 and "angular2-query-builder" is "^0.6.2". i added QueryBuilderModule at app.module.ts file....
0
votes
0
answers
121
views
Why Query Builder in lumen doesn't work the same as it is working in MySQL Workbench
I am using lumen framework for the api service.
Now suppose,
I have a select query where I am assigning an alias to a particular column and then in the order by clause I am using the same column name ...
0
votes
1
answer
245
views
Laravel model addSelect in boot function only works if select() is in query?
I have a model in my laravel application called Job that uses the display_name attribute. Because of this, I need all of the columns that make up the display name to be included in any query ran on ...
1
vote
0
answers
57
views
Count the number of rows in a related table within a single row main table in laravel query builder
Help me little. I use laravel Query Builder. I have posts and related replies table. I need total number of replies in the post(not use get(), use first() or find()).
$post= DB::table('posts')
...
0
votes
2
answers
73
views
How to pass a 2d result set from a controller to a view file in CodeIgniter
at library/comment.php
function getSelectedOneFieldJoin2TblGroupOrder($select, $table, $where, $join_table1, $join_condition1, $join_table2, $join_condition2, $order_by=null)
{
$this->CI->db-...
0
votes
1
answer
728
views
Adding a validator according to the operator used in react-querybuilder
I can add validators to fields. But I want that validator to be active only when I use the like operator.
In this example, if I used the like or unlike operators in the phoneNumber field, I expect it ...
0
votes
1
answer
362
views
Count all the nested relationship records using Laravel eloquent
Currently, I am building comments for a post whose model looks this:
class Comment extends Model
{
use HasFactory;
protected $fillable = ['user_id', 'post_id', 'parent_comment_id', 'text', '...
0
votes
1
answer
95
views
Larvel query builder query taking 20 seconds to execute
I have a Laravel query builder query which is taking more than 20 seconds to retrieve ~2500 records. Ideally it should take much less time. I think the orOn join in my query is what is causing this ...
0
votes
1
answer
356
views
How to add subquery or hint in php symfony query builder without breaking query structure
When the data is increased, a query that runs locally in 0.2 seconds takes 20 seconds on an AWS MySQL instance. The solution was to add a subquery or hint.
Sql origin.
SELECT DISTINCT m0_.id AS id_0, ...
0
votes
1
answer
262
views
Facing Flickering issue in multiselect checkbox dropdown when try to implement react syncfusion query builder component inside MUI Drawer component
I'm trying to implement the React Syncfusion query builder inside the MUI drawer. While implementing this, I'm facing a flickering issue with the multiselect checkbox for the IN operator.
If I ...
-1
votes
1
answer
59
views
Why this EntityManager Query doesn't return anything?
I have a User entity and a HistoryAccess entity that binds two User instances as follows: a user specified in it as "allowed" can get a user specified as "owner".
I am trying to ...
1
vote
0
answers
107
views
TypeOrm - pass column result to a subquery
I want to create a query builder in TypeOrm and search for accounts by some criteria, but I am using a subquery in the where clause, and there I have an equality check (id1 = id2), but one of them (...
0
votes
1
answer
93
views
Incorrect Opening Balance return for MySQL query
I have a view as follows to filter items for receiving & issuing like A4, A3, .......within the selected date range from Start Date to End Date.
receiving are denoted by "purchase" and ...