Alternate sql query

QuestionsAlternate sql query
Felix Lugaru asked 7 years ago

Hello!
I use complex sql queries to retrieve data. In this case, an attempt to sort or search the data in the table leads to sql errors.
How can I specify an alternate sql query to sort by the desired field?

7 Answers
Abu Ghufran answered 7 years ago

Hello,

If you can email me the SQL, it would help in suggesting an alternate.

Awaiting for reply.

Felix Lugaru answered 7 years ago

$loader->select_command = "SELECT * FROM ( SELECT news_id, url, keywords, keywords_hash, COUNT(*) AS count FROM {$site[$sid][dbprefix]}_seo_referer AS t1 WHERE date >= '{$date}' GROUP BY keywords_hash ) AS t2 WHERE count >= {$site[$sid][chastota]}";

Here in the request, if you try to search by field "count" from phpgrid, an error occurs sql query.

Felix Lugaru answered 7 years ago

Maybe I have an old version phpgrid? My version phpgrid-full-v1.4.8.2
If so, where to get the update?

Felix Lugaru answered 7 years ago

Everything would be easier if it were possible to be to each field in phpgrid assigned its own alternative sql query.
I look forward to your comments.

Abu Ghufran answered 7 years ago

Working demo emailed to you.
Regards,

Gerald Nelson answered 6 years ago

Dear Abu Ghufran,

I also got the same problem, can you send the new version for me.

Thank you

Abu Ghufran answered 6 years ago

Hello Gerald,

I've emailed you possible fix. Kindly check and reply back on email.

Thanks,

Your Answer

2 + 11 =

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?