Sedang Disiapkan

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

Kemahiran: Pemprosesan Data, PHP

Lihat lebih lanjut: 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 name, pax, 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, mysql check

Tentang Majikan:
( 6 ulasan ) portimao, Spain

ID Projek: #281394

Dianugerahkan kepada:

srahmant

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

$30 USD dalam 0 hari
(18 Ulasan)
4.7

18 pekerja bebas membida secara purata $48 untuk pekerjaan ini

codersam

Lets start the work

$50 USD dalam sehari
(142 Ulasan)
7.3
Georgia

I think I can help you.

$90 USD dalam 3 hari
(92 Ulasan)
7.3
shuiwatermizu

0 hours' work

$30 USD dalam 0 hari
(93 Ulasan)
6.4
wincent

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

$50 USD dalam 0 hari
(81 Ulasan)
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 dalam sehari
(23 Ulasan)
5.9
zub

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

$100 USD dalam sehari
(47 Ulasan)
5.8
ezee

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

$100 USD dalam sehari
(41 Ulasan)
5.6
waterstudio

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

$50 USD dalam 0 hari
(57 Ulasan)
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 dalam sehari
(30 Ulasan)
5.2
phpoutsource

Please see the PMB

$30 USD dalam sehari
(18 Ulasan)
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 dalam sehari
(11 Ulasan)
5.0
royventures

please view pmb.

$30 USD dalam sehari
(11 Ulasan)
4.9
AKSolutions

Thanks. Please accept the offer if are ready. Regards

$50 USD dalam sehari
(7 Ulasan)
4.2
RajakScripts

Hi, please read PMB.

$50 USD dalam sehari
(9 Ulasan)
4.0
websol4u

i can do it

$30 USD dalam sehari
(13 Ulasan)
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 dalam 3 hari
(0 Ulasan)
0.0
ultrajoom

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

$30 USD dalam 2 hari
(0 Ulasan)
1.2
winter2

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

$30 USD dalam sehari
(0 Ulasan)
0.0