Rob_Tunes
Posts: 1
|
| Posted: 11/22/2006, 10:45 AM |
|
Hello,
I am a happy new Studio user but have now got a problem I cannot solve despite reading documentation and this forum. I use mysql and php and have a basic knowledge of sql. I have pasted this query into grid builder, it generates the grid but when I go to the add search page of the grid builder it is greyed out so I cannot add a search function. Here's what I am trying to achieve: I want to be able to filter countries.
SELECT
`all_matches`.`club`,
SUM(`all_matches`.`points_club`) AS `points_club`,
SUM(`all_matches`.`goals_in_favour`) AS `goals_in_favour`,
SUM(`all_matches`.`goals_against`) AS `goals_against`,
SUM(`all_matches`.`won`) AS `won`,
SUM(`all_matches`.`draw`) AS `draw`,
SUM(`all_matches`.`lost`) AS `lost`,
`all_matches`.`country`
FROM
`all_matches`
WHERE
(`all_matches`.`country` = "search result here please!!")
GROUP BY
`all_matches`.`club`,
`all_matches`.`country`
ORDER BY
`points_club` DESC
At a guess the where clause needs to reference the search somehow but after several frustrating hours I cannot get this working. Thanks in advance for any help!
|
 |
 |
Rene S
|
| Posted: 11/23/2006, 1:10 PM |
|
Hi,
In grid sql use WHERE `all_matches`.`country` = '{s_searchfield}' and in searchbuilder choose the country fiels as the search field. Search field will be defined as s_searchfield. make sure it is the same as in your wher clause.
Rene
|
|
|
 |
|