Jack_Walter
Posts: 39
|
| Posted: 09/10/2008, 9:07 AM |
|
Hi Rick,
I can edit the data type for that field (from Date to Text), but is there a way to edit the search functionality in such a simple way, too?
When I switch to the code tab I search for the corresponding fieldname I'll get this block of code:
//Prepare Method @3-9E36E3E3
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urls_tour_name", ccsText, "", "", $this->Parameters["urls_tour_name"], "", false);
$this->wp->AddParameter("2", "urls_tour_departure_date", ccsDate, $DefaultDateFormat, $this->DateFormat, $this->Parameters["urls_tour_departure_date"], "", false);
$this->wp->AddParameter("3", "urls_ship_ship_id", ccsInteger, "", "", $this->Parameters["urls_ship_ship_id"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opContains, "tour.tour_name", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "tour.tour_departure_date", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsDate),false);
$this->wp->Criterion[3] = $this->wp->Operation(opEqual, "ship.ship_id", $this->wp->GetDBValue("3"), $this->ToSQL($this->wp->GetDBValue("3"), ccsInteger),false);
$this->Where = $this->wp->opAND(
false, $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]),
$this->wp->Criterion[3]);
}
//End Prepare Method
If I just edit this one:
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "tour.tour_departure_date", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsDate),false);
From opEqual to opContains I get the same error message as before.
And If I do this:
$this->wp->AddParameter("2", "urls_tour_departure_date", ccsText, "", "", $this->Parameters["urls_tour_departure_date"], "", false);
$this->wp->Criterion[2] = $this->wp->Operation(opContains, "tour.tour_departure_date", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), cssText),false);
The error message is gone and I can find substrings (only day, only month, etc.) but when I use the seperator "." to combine a search for day + month nothing will be found.
Sorry, I'm not a programmer so I can try only the obvious things ;(
Regards,
Jack
|