[FX.php List] Solved? Anyone got a sober solution to a date range
search?
Gjermund Gusland Thorsen
ggt667 at gmail.com
Tue Aug 12 17:52:33 MDT 2008
However in my solution the string is always made by php itself...
and not from a variable, with . there is no error: 500
with / there is error: 500
ggt
2008/8/13 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
> if you use the dots, you will probably not need to do urldecode()...
>
> ggt
>
> 2008/8/13 Tim 'Webko' Booth <tim at nicheit.com.au>:
>>
>> On 13/08/2008, at 3:32 AM, Gjermund Gusland Thorsen wrote:
>>
>>> Well date searching works with mm/dd/ccyy, however when ...mm/dd/yyyy is
>>> added,
>>> the reply is error: 500 for both my FMSA installations 7.0 and 8.0v4r2
>>
>> Interesting - I'vve not done a lot of date range searching but now have had
>> a play...
>>
>> If the date range is hard-coded in the php, it seems to be fine:
>>
>> http://apachescricket.com/schedule_date.php
>>
>> Will hard code for 01/01/2008...12/12/2008
>>
>> Adding a parameter for the 1st date search:
>>
>> http://apachescricket.com/schedule_date.php?date1=19/04/2008
>>
>> and hard-coding the second also worked straight away
>>
>> Adding the second parameter:
>>
>> http://apachescricket.com/schedule_date.php?date1=04/19/2008&date2=10/19/2008
>>
>> initially failed, but then I added urldecode and it was fine
>>
>> <?php
>> if (isset($_REQUEST['date1'])){
>> $date1 = urldecode($_REQUEST['date1']);
>> } else {
>> $date1 = "04/14/2008";
>> }
>> if (isset($_REQUEST['date2'])){
>> $date2 = urldecode($_REQUEST['date2']);
>> } else {
>> $date2="12/12/2008";
>> }
>> $dateSearch = $date1."...".$date2;
>> echo "Search= ".$dateSearch;
>> //Find matches
>> $matchObj=new FX($dbHost,$port,$dbType,$conType);
>> $matchObj -> setDBPassword($dbPass,$dbUser);
>> $matchObj -> setDBData($dbName,'MATCH', 'all');
>> $matchObj -> AddDBParam('Week1', $dateSearch , 'eq');
>> // $matchObj -> AddDBParam('Grade', $grade , 'eq');
>> $matchObj -> AddDBParam('Innings', "1" , 'eq');
>> $matchObj -> AddSortParam('_kp_MatchNumber', 'ascend');
>> $matchData = $matchObj -> FMFind();
>> ?>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
More information about the FX.php_List
mailing list