Error while searching

QuestionsError while searching
Torin asked 3 years ago

Hi!
After a long time of good performance, I had to modify sql_command in one of the tables. Well – simply speaking, it has been modified very much 🙂
And while the grid itself behaves correctly, unfortunately the search stopped working. I get an error, I will paste it below. It looks like the grid is sticking the wrong place where the looking procedure should.
This is what my sql looks like:
SELECT
projects.id,
projects.client_name,
projects.numer_zam,
projects.project_name,
projects.nr_zam_obce,
projects.data_przyjecia,
projects.finished,
projects.wartosc_zam_szac – projects.szac_koszt_rg – projects.szac_koszt_fakt – projects.szac_koszt_zarz AS forecast,
projects.wartosc_zam_szac,
projects.szac_koszt_rg,
projects.szac_koszt_fakt,
projects.szac_koszt_zarz,
CONCAT (
projects.wartosc_zam_szac,
‘<br>’,
projects.wartosc_zam_szac – projects.szac_koszt_rg – projects.szac_koszt_fakt – projects.szac_koszt_zarz
) AS Wartosci_zam,
CONCAT (
projects.szac_koszt_rg,
‘<br>’,
projects.szac_koszt_fakt,
‘<br>’,
projects.szac_koszt_zarz
) AS Estimates,
COUNT (v.period) / 2 AS ilosc_rbg,
CATFISH(
IF (time period> 0, 0.5, 0) * time rate
) AS wartosc_rbg,
k AS net costs,
sum_cost_zarz,
IFNULL (k, 0) + IFNULL (sum_cost, 0) + IFNULL (
CATFISH(
IF (time period> 0, 0.5, 0) * time rate
),
0
) AS sum_costs,
IFNULL (projects.wartosc_zam_szac, 0) – (
IFNULL (k, 0) + IFNULL (sum_cost, 0) + IFNULL (
CATFISH(
IF (time period> 0, 0.5, 0) * time rate
),
0
)
) AS Result
FROM
projects
LEFT JOIN time ON projects.id = time.project_id
LEFT JOIN (
SELECT
project_id,
SUM (amount) AS k
FROM
costs
GROUP BY
project_id
) AS costs
HE
costs.project_id = projects.id
LEFT JOIN (
SELECT
project_id,
SUM (amount) AS sum_cost
FROM
cost_detail_detail
GROUP BY
project_id
) AS costs_zarz
HE
costs_zarz.id_project = projects.id
WHERE
projects.usuniete = FALSE
$ ending_list
GROUP BY
projects.id

And this is what this sql looks like when it crashes – you can see that it is not where you need to add the search:
I bold the wrong place

SELECT projects.id, projects.client_name, projects.zam_number, projects.project_name, projects.no_zam_ foreign, projects.data_party, projects.completed, projects.wartosc_zam_szac – projects.szac_koszt_rosz projects – projects.szac_koszac_fakt – projects.szac_koszac_fakt – , projects.szac_koszt_rg, projects.szac_koszt_fakt, projects.szac_koszt_zarz, CONCAT (projects.wartosc_zam_szac, ‘
‘, projects.wartosc_zam_szac – projects.szac_koszt_rg – projects.szac_koszt_fakt – projects.szac_koszt_zarz) AS Wartosci_zam, CONCAT (projects.szac_koszt_rg,’
‘, projects.szac_cost_fakt,’
‘, projects.szac_cost_zarz) AS Estimates, COUNT (time.period) / 2 AS quantity_rbg, SUM (IF (time.period> 0, 0.5, 0) * time rate) AS value_rbg, k AS net cost, sum_cost_of, IFNULL ( k, 0) + IFNULL (sum_cost_of, 0) + IFNULL (SUM (IF (time.period> 0, 0.5, 0) * time.time), 0) AS sum_costs, IFNULL (projects.zam_ass, 0) – (IFNULL (k, 0) + IFNULL (sum_cost, 0) + IFNULL (SUM (IF (time.period> 0, 0.5, 0) * time.time), 0)) AS Result FROM projects LEFT JOIN time ON projects.id = time.project_id LEFT JOIN (SELECT project_id, SUM (amount) AS k FROM costs AND (`order_number` LIKE ‘% 18%’) GROUP BY project_id) AS costs ON costs.project_id = projects.id LEFT JOIN (SELECT project_id, SUM (amount) AS sum_cost_zarz FROM cost_zarzadu_detail GROUP BY project_id) AS cost_zarz ON costs_zarz.id_project_id = projects.id WHERE projects.usuniete = FALSE AND projects.zakonczone = FALSE GROUP BY projects.id

1 Answers
Abu Ghufran Staff answered 3 years ago

Hello,

I’ll be emailing you latest build which includes it’s fix.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

7 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?