error 500 when count in select

Questionserror 500 when count in select
Wolfgang asked 7 years ago

i’m using the grid for food and ingredients – so i use 2 files. first for ingredients and second for food products with subgrid forlink between those two tables.
to count and show the number of food, where ingredient x is linked to, i use following select for the grid
“SELECT ingredients_ID, name, price,
(SELECT count(fi.food_id) FROM 1_food_ingredients fi WHERE ingredients_id = fi.ingredients_id) AS count
FROM 1_ingredients”;
the grid / select works fine, but as soon as i want to filter for a certain name of the food, i receive error 500. no error shows up, when count-select is deleted!
any idea?

1 Answers
Abu Ghufran Staff answered 7 years ago

I tested similar query here in dev line and it’s working fine. There could be other reasons as well.

  • Make sure your query run on other mysql ide e.g. phpmyadmin
  • Check error log details from apache error log file. usually in /var/log/httpd/log folder OR in windows logs folder where you installed it.
  • You might need version upgrade. In that case please email me your order number or payment email address at [email protected]
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

16 + 12 =

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?