Find Jobs
Hire Freelancers

Convert MySQL PHP Code to include MySQLi Prepared Statements

£10-20 GBP

In Progress
Posted over 8 years ago

£10-20 GBP

Paid on delivery
ONLY BID IF YOU CAN START AND COMPLETE IMMEDIATELY! Simple Task - Convert this short piece of code to include prepared statements for efficiency and security. I'm aware it's poorly designed thats what I need you to fix. Plenty more work for best cost and quality work, $mysqli = new mysqli($servername, $username, $password, $dbname); /* check connection */ if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit(); } if ($_GET['sort'] == 'date') { $sort_query = 'outbounddeparture ASC';} else {$sort_query = 'priceperadult ASC';} $form_airport = $_GET['form_airport']; $form_lessthan = $_GET['less-than']; $from_month = $_GET['month']; $date = $from_month; $startdate = date("m", strtotime ( $date ) ); $enddate = date("m", strtotime ( '+1 month' , strtotime ( $date ) )); $destination = $_GET['form_destination']; if ($from_airport == 'LON') {$airport_query = " AND outbounddepartureairport IN ('LHR','LGW','STN','LTN','SEN')";} else{$airport_query = "AND outbounddepartureairport = '{$form_airport}'";} $query = "SELECT MIN(priceperadult), hotelname, priceperadult, duration, outbounddepartureairport, deeplinkurl, hotelidentifiercode, outbounddeparture FROM search_results WHERE priceperadult < '{$form_lessthan}' ".$airport_query." AND outbounddeparture >= '2016-{$startdate}-01' AND outbounddeparture < '2016-{$enddate}-01' AND outbounddeparture < '2016-{$enddate}-01' AND holidayresort = '{$destination}' GROUP BY hotelname ORDER BY {$sort_query} "; $result = $mysqli->query($query); while ($row = $result->fetch_assoc()) :?> ...........
Project ID: 8716830

About the project

15 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
15 freelancers are bidding on average £16 GBP for this job
User Avatar
Hello! With 98% to 99% completion rate, 850+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :) I am available to get started on your project right away. I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
£27 GBP in 1 day
5.0 (672 reviews)
7.8
7.8
User Avatar
Hi, We can convert it into mysqli or pdo with proper placeholder in sql Ready to start now. Regards
£20 GBP in 1 day
4.9 (224 reviews)
6.6
6.6
User Avatar
A proposal has not yet been provided
£18 GBP in 1 day
5.0 (115 reviews)
6.2
6.2
User Avatar
I read your project description and that make sense , at there you described issue very well. I know all stuff good that you want for this job, PHP, javascript, mysql, html, etc very well. I can manage this job very well for you. Thank
£13 GBP in 1 day
5.0 (149 reviews)
6.2
6.2
User Avatar
Hello, i have checked your project and would like to have your project. I am confident to fulfill your requirements in timely manner, along with quality work. Please check your pmb.
£18 GBP in 1 day
4.6 (42 reviews)
5.7
5.7
User Avatar
A proposal has not yet been provided
£20 GBP in 1 day
4.5 (15 reviews)
4.6
4.6
User Avatar
A proposal has not yet been provided
£13 GBP in 0 day
4.7 (16 reviews)
3.8
3.8
User Avatar
Dear Sir I am ready to convert this short piece of code to include prepared statements for efficiency and security right away. Please discuss details in chat. Waiting for your early reply. Thanks
£13 GBP in 0 day
5.0 (5 reviews)
2.8
2.8
User Avatar
Hi Sir, I already worked with PHP and MySQL for various projects. I can do it today. I will use PDO PHP tutorial to create prepared statement to make neater query. Once approved I will start. Thanks
£13 GBP in 1 day
5.0 (8 reviews)
2.8
2.8
User Avatar
As requested, I can start on this immediately and have it delivered as soon as it is completed. Conversion of this to prepared statements would require testing, so if possible, can you send me the schema of your database and a bit of information to populate the table in order to properly test my statements without affecting your current database? This will take no longer than 2 hours.
£13 GBP in 1 day
5.0 (7 reviews)
2.1
2.1
User Avatar
A proposal has not yet been provided
£13 GBP in 1 day
5.0 (2 reviews)
1.3
1.3
User Avatar
Hi, This task is perfect for me. i can finish it in few minutes. please send me a message if you are interested.
£12 GBP in 1 day
5.0 (1 review)
0.3
0.3

About the client

Flag of UNITED KINGDOM
st neots, United Kingdom
5.0
4
Payment method verified
Member since Oct 16, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.