I gang

mysql filter problem

Hi ,

I need some help filtering results on mysql I have a table with :

Hotel { Name of the hotel }

start_date { Date When season starts }

end_date { Date When season ends }

room { Room that the hotel has }

Price { Price of the room for the hotel }

contract_id { Contract reference number for hotel }

Rate_base { Prices per Person = PP / Prices for Unit = PU }

The values that i output from the table is as follows or please check attach mysql table.

Room for 2 People

Hotel: Bayside | ROOM: Studio | PRICE: 20 | RATE BASE: PU

Hotel: Bayside | ROOM: One bedroom apartment | PRICE: 40 | RATE BASE: PU

Hotel: Sheraton algarve | ROOM: Twin | PRICE: 15 | RATE BASE: PP

Hotel: Sheraton algarve | ROOM: Suite | PRICE: 25 | RATE BASE: PP

Hotel: Savoy Hotel | ROOM: Twin Room | PRICE: 9 | RATE BASE: PP

Hotel: Savoy Hotel | ROOM: Junior Suite | PRICE: 16 | RATE BASE: PP

It should have a filter to identify when rate base is PP it multiplies by the number of people wich in this case is 2 so the price is {price} * 2 when rate_base is PP when rate_base = PU there’s no need to multiplie by number of pax; can anyone sort this out?

The correct output results ordered by price for each unit shoud be the ones mentioned below, please results should output what units are the cheapest and not wich record is cheaper. I will give example how it’s done when rate_base is = PU and PP

Room for 2 People

Hotel: Savoy Hotel | ROOM: Twin Room | PRICE: 9 | RATE BASE: PP |

ex: 9*2 = 18

Hotel: Savoy Hotel | ROOM: Junior Suite | PRICE: 16 | RATE BASE: PP

ex: 16* 2 = 32

Hotel: Bayside | ROOM: Studio | PRICE: 20 | RATE BASE: PU

ex: 20

Hotel: Bayside | ROOM: One bedroom apartment | PRICE: 40 | RATE BASE: PU

Ex: 40

Hotel: Sheraton algarve | ROOM: Twin | PRICE: 15 | RATE BASE: PP

Ex: 15*2 = 30

Hotel: Sheraton algarve | ROOM: Suite | PRICE: 25 | RATE BASE: PP

Ex: 25*2 = 50

Færdigheder: Databehandling, PHP

Se mere: mysql filter, mysql filte, time data filter mysql, mysql filter time, mysql filter data, mysql filter describe, filter day mysql, mysql filter numbers, twin, problem with name, pax, junior\, hotel contract, filter, filter sort, cheapest, bedroom, mysql data base, mysql sort, table sort filter, date mysql sort, mysql help table, mysql output table, php mysql filter results, mysql record

Om arbejdsgiveren:
( 6 bedømmelser ) portimao, Spain

Projekt-ID: #281394

Tildelt til:

srahmant

Please check your PM.I have 3 years professional experience on PHP,MySql,AJAX. I already done many complex PHP/MySql based [url removed, login to view] i am sure i could complete this project successfully in timely.

$30 USD in 0 dage
(18 bedømmelser)
4.7

18 freelancere byder i gennemsnit $48 for dette job

codersam

Lets start the work

$50 USD på 1 dag
(142 bedømmelser)
7.3
Georgia

I think I can help you.

$90 USD in 3 dage
(92 bedømmelser)
7.3
shuiwatermizu

0 hours' work

$30 USD in 0 dage
(93 bedømmelser)
6.4
wincent

easy work for me, im very good at mysql and sql.

$50 USD in 0 dage
(81 bedømmelser)
6.0
SKDevelopment

I could do that if you wish. Also I have some comments/suggestions on your database table structure. I'll describe them by PM.

$35 USD på 1 dag
(23 bedømmelser)
5.9
zub

Hello Sir, Please see the Pm. thank you With regards Zub

$100 USD på 1 dag
(47 bedømmelser)
5.8
ezee

We can fix this for you. Please pass us more information. Thanks.

$100 USD på 1 dag
(41 bedømmelser)
5.6
waterstudio

I can start right away. Check my feedback to see that I'm the right person for this job.

$50 USD in 0 dage
(57 bedømmelser)
5.6
grumps

Well experienced web programmer with rich mysql knowledge. Your task will be completed quickly and done according to your requirements.

$100 USD på 1 dag
(30 bedømmelser)
5.2
phpoutsource

Please see the PMB

$30 USD på 1 dag
(18 bedømmelser)
5.1
frankouz

You need to filter data getting the price that depend of the rate base. that is possible using sql. View PM for details.

$30 USD på 1 dag
(11 bedømmelser)
5.0
royventures

please view pmb.

$30 USD på 1 dag
(11 bedømmelser)
4.9
AKSolutions

Thanks. Please accept the offer if are ready. Regards

$50 USD på 1 dag
(7 bedømmelser)
4.2
RajakScripts

Hi, please read PMB.

$50 USD på 1 dag
(9 bedømmelser)
4.0
websol4u

i can do it

$30 USD på 1 dag
(13 bedømmelser)
3.8
river777

Dear Sir, I believe this is an small modification on your query. Based on workload it would take maximum 1-3 days. Please give me a scope to work with you. Thanks

$45 USD in 3 dage
(0 bedømmelser)
0.0
ultrajoom

Hi, Ihave expertise on MySQL & MSSQL. So I can do it totally. Regards, UltraJoom

$30 USD in 2 dage
(0 bedømmelser)
1.2
winter2

i can do this task in a few hours. please give me this job.

$30 USD på 1 dag
(0 bedømmelser)
0.0