Hi,
I have been using some tools to generate my php code as i have little knowledge of php.
the tools are ok but the support is rubbish.
everything is generated in US date and time format and i need it to be in UK.
anyway to cut a long story short they want me to modify the code their tools create however i have no knowledge and i go around in circles with them time wasting when i just need to get around this.
this is what they have came back to me with:
//add a comparison argument from an edit box
function addComparisonFromEdit($Column,$EditName,$Logical,$Comparison,$FieldType) {
$theValue = WA_DBS_PostOrGetField($EditName);
if (isset($theValue) && $theValue != "undefined" && $theValue != "") {
$this->addComparison($Column,$theValue,$Logical,$Comparison,$FieldType);
}
}
The WA_DBS_PostOrGetField($EditName); is what gets the date. If you reformat the date from the UK format to the correct search format, you should get the correct start date search.
On your results page, there should be some code that looks like this:
//comparison list additions
$WADbSearch1->addComparisonFromEdit("HistoryDate","begdate","AND",">=",2);
$WADbSearch1->addComparison("HistoryDate","".WAQB_getEndDate($_POST["enddate"]) ."","AND","<=",2);
with different form field names (I used begdate and enddate) and also different column names (I used HistoryDate). To get the end date to search correctly, you will want to format the $_POST["enddate"] to the correct search format from your UK value.
i need to modify this using a string function into uk format however i do not know how i would write this and where it woudl go in the code he has told me to modify?
could someone with PHP knowledge help tell me where i would add the string function to the code as i do not know where it would go?
i think i add gmdate by looking on php.net but i am not sure and not sure where to add.
thank you all for your great help.
This forum is great.
just wish the company i am dealing with who i pay to use their product were better.(little moan, sorry)
many thanks