Help with Search. Very Urgent, please help!

5 posts by 3 authors in: Forums > CMS Builder
Last Post: April 27, 2009   (RSS)

By dsn7287 - April 25, 2009

Ok I guess this is pretty straight forward problem.

In my list viewer page I use php get to get some values into some variables like so:
$quick_option = $_GET['varQuickOption'];
$start_date = $_GET['varStartdate'];
$end_date = $_GET['varEnddate'];
$match_type = $_GET['varType'];
$team_type = $_GET['varTeam'];

the problem I have is I want to be able to use these variables in the list viewers 'where' clause like so:

list($fixturesRecords, $fixturesMetaData) = getRecords(array(
'tableName' => 'fixtures',
'where' => 'match_type = $match_type',
'perPage' => '15',
));

However I am having no luck. This gave me the error:
getRecords(fixtures) MySQL Error: Unknown column '$match_type' in 'where clause'

I have tried putting it like this: "$match_type", this '$match_type' and even this echo($match_type) but nothing works!

Could anyone provide me with a solution please? Any help would be VERY VERY much appreciated.

Cheers

Re: [Dave] Help with Search. Very Urgent, please help!

By dsn7287 - April 26, 2009

H Dave,

thanks so much for the quick response (and that too over the weekend! [cool])

The reason I cant use the inbuilt search is, that I have my own if condirtions that need to be met, like dates between, wut quick option was chosen etc...)

Cheers again mate...

Re: [dsn7287] Help with Search. Very Urgent, please help!

By ross - April 27, 2009

Hi there.

Just wanted to make sure everything is moving along. It sounds like Dave's post got your going again but if you are still having trouble with anything, let me know :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Help with Search. Very Urgent, please help!

By dsn7287 - April 27, 2009

MAte everything right on track... Wroking like a charm... Dave's code definitely gave me the direction... The information on the fourm has been invaluable in me being able to continue... Thanks to all the contributors!