Dear Sir Mr.Rao
How we can set and use effective dates with mysql/mariadb for example
Item A Price 60 Rs from Dt.20/06/2017
Item A Price 80 Rs from Dt.24/06/2017
Thanks & Regards
function GetPrice( cItemID, dDate )
local cSql
cSql := "SELECT date,price FROM prices WHERE itemid = ? AND IFNULL( date, '0000-00-00' ) <= ? ORDER BY date DESC LIMIT 1"
cSql := oCn:ApplyParams( cSql, { cItemID, dDate } )
return oCn:QueryResult( cSql )[ 2 ]
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 36 guests