Hi,
I’m having the following problem trying to build my first snippet: I made a page which queries the querystring and passes the values into a query, which works nicely, but not with special characters.
This is a part of my code:
$make = $modx->getOption('make',$scriptProperties);
$model = $modx->getOption('model',$scriptProperties);
if ((!empty($model)) && (!empty($make))) {
$query = $modx->newQuery('table_CarDetails');
$query->where(array('make' => $make, 'model' => $model));
$query->sortby('type','ASC');
$query->groupby('type');
...
The table ’table_CarDetails’ contains records with make = ’Coupé’.
But if $make gets the value ’Coupé’, no records return, but if the value for $make is ’Coupe’ I get results back from the table.
I suppose I’m doing something not right but can not figure out what ... who can give me a push in the right direction?
I’m using 2.0.4