I have sql database which has Rents table. My problem is about Total Cost is not correct ,because [StayDays] can be 3 Hrs or be the number of days which is calculate in the code as follows is:
[Cost]*[StayDays] as Total Cost
if [StayDays] is 3 Hrs then Total Cost is [Cost]
How do I code the code to be correct?
[Cost]*[StayDays] as Total Cost
if [StayDays] is 3 Hrs then Total Cost is [Cost]
B4X:
WebView1.LoadHtml(DBUtils.ExecuteHtml(SQL1,"SELECT [RoomNo] As Room No.,[Guest] as Name ,[Phone] as Phone No.,[StayDays] as Hr/Days,[Cost]*[StayDays] as Total Cost From Rents",Null,0,True))
How do I code the code to be correct?