New Zenner
- Join Date:
- May 2008
- Posts:
- 29
- Plugin Contributions:
- 0
Simple SEO URL (OLD version) [support thread]
I made that change but the problem is still there.
I turned SSU back on, so you should see the error if you use this URL:
From the error message, it looks like the SQL error is getting thrown in this group of code
// Aliases needed to be loaded on demand
static function retrieveAliasesOnDemand($params, $field, $compare, $links, $aliases, $status=null){
$elements_to_query = array_diff(explode('/',$params), self::$$compare);
if(count($elements_to_query) > 0) {
foreach($elements_to_query as $element){
$conditions[] = "$field LIKE '%/$element/%' ";
}
$conditions = implode(' OR ', $conditions);
$query_string = 'SELECT DISTINCT link_url, link_alias FROM '.TABLE_LINKS_ALIASES." WHERE ($conditions)";
$query_string .= !empty($status) ? " AND status = $status" : '';
$query_string .= " ORDER BY length(link_alias) DESC";
global $db;
$alias_result = $db->Execute($query_string);
while(!$alias_result->EOF){
array_push(self::$$aliases, $alias_result->fields['link_alias']);
array_push(self::$$links, $alias_result->fields['link_url']);
$alias_result->MoveNext();
}
}
}
Specifically where the SELECT DISTINCT ... .query is being created. Is there a way to sanitize the data as it's building the conditions array?