Find Jobs
Hire Freelancers

Php function to get data from mysql.

$10-30 USD

In Progress
Posted over 7 years ago

$10-30 USD

Paid on delivery
Using php get 10 values from a mysql table with a select and if the 10 values are not obtained then the function must get the rest of the values needed for the 10 under another select. The following function must be modified to get the $array. private function getTagArray($idChannel){ $array = array(); $sql = "SELECT idTagPhoto FROM ((SELECT idTagPhoto FROM ((SELECT idTagPhoto,votes FROM tagphotos_view WHERE (idChannel = $idChannel) ORDER BY idTagPhoto DESC limit 500) as tagphotos_view3) ORDER BY votes DESC limit 100) as tagphotos_view2) GROUP BY idTagPhoto ORDER BY RAND() LIMIT 10"; $result = mysqli_query($this->db, $sql); $rows = mysqli_num_rows($result); while($row = $result->fetch_assoc()){ array_push($array, $row["idTagPhoto"]); } return $array; } } The "SELECT" of my code must be respected to get the same result, but the function must be modified so that if the select does not reach 10 data, for example if this select only obtains 7 data, the other 3 data must obtain them in another way: "SELECT idTagPhoto FROM tagphotos_view WHERE (idChannel = 1) LIMIT 3" I will try the code on my computer to see if it works.
Project ID: 12711134

About the project

21 proposals
Remote project
Active 7 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
21 freelancers are bidding on average $26 USD for this job
User Avatar
Greetings! I am an expert PHP programmer and I have just seen your project description. I can complete this function modification within an hour max. Looking forward to hear from you.
$25 USD in 0 day
4.8 (128 reviews)
6.9
6.9
User Avatar
A proposal has not yet been provided
$20 USD in 1 day
4.9 (328 reviews)
6.9
6.9
User Avatar
Hello Greetings of the day!!! I’ve carefully gone through your job posting. I am having 5+ years of experience in Word press, Shopify, HTML and PHP. I have designed many e-commerce and woo-commerce websites in last 5years. I believe my capabilities would be ideal for you. I can show you my work if you will give me a chance. Can I have an interview please? Regards, Nidhi
$30 USD in 1 day
4.8 (65 reviews)
5.9
5.9
User Avatar
Hi, I read carefully your project, and I wanna do it for you. If you wanna work together, send me a message to discuss details. I am an experienced Web Developer and Web Designer, and have worked with wide variety of skills like PHP, MySQl, jQuery / Prototype, Javascript, HTML, CSS and more for many years. I also have worked over many Wordpress projects. Have good communication skills and great responsibility.
$15 USD in 1 day
4.9 (104 reviews)
5.7
5.7
User Avatar
Hello there i am a professional and have extensive experience, please contact to discuss in details.. i will be waiting thanks regards
$30 USD in 2 days
5.0 (28 reviews)
5.3
5.3
User Avatar
Hi, hope you're fine. This is an easy task, should be something very quick. I'm a web developer and database admin. If you agree, I would suggest to use the same query with an "UNION" clause to merge the record from both resultsets in a single query. Of course, if you agree and if possible. Please consider my bid. Regards. Carla...
$15 USD in 1 day
5.0 (9 reviews)
3.8
3.8
User Avatar
Hello there. This looks like a simple task and I should be able to deliver it quickly. We can discuss more details over chat if you're interested. Thanks in advance. Best regards, Diogo Bragança
$30 USD in 1 day
5.0 (14 reviews)
3.4
3.4
User Avatar
Hey, I had a chance to go through your complete job description. And we think this is the best project matching with our skills. I would like to have a verbal conversation with you to walk through your web development project. We can assure you that we have all the skills and expertise that you require. We have extensive experience in building incredible PHP based websites and web apps with a team of professional developers. We are ready to perform the tasks mentioned. We are 100 times more likely to give you the best quote after knowing the complete details. Anything you want us to explain? Then please drop us a message in our inbox, our team is 24/7 available to help you out. We believe in 100% satisfaction to the customers by accomplishing their requirements, and we won’t let you fly solo until you are fully satisfied with your final product. Your satisfaction is our priority. Please make a moment from your precious time to response our bid Why us? • 12+ Years of experience in PHP development, web apps, frameworks, WordPress Development • Unlimited revisions • Expert developers • Professional and creative coding skills • 24/7 customer support We are expecting to hear back from you soon, Regards, Hassan and team.
$25 USD in 1 day
5.0 (2 reviews)
2.4
2.4
User Avatar
from my profile you already see that I'm a motiongraphic artist. also by reviews u see how i work and that im professional what also means Im responsible for my work. right now Im trying to move back to programming ( i was a programmer before i started motiongraphics) as a professional i know that main thing for project to be successfull is both of us to feel safe so i offer this kind of pipeline : you dont pay anything until u see the result. u pay only after u see job is done. if u are ok with this offer feel free to contact me ( comunication is second jey to a good prject) hope to hear from you soon
$25 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of SPAIN
madrid, Spain
5.0
126
Payment method verified
Member since Mar 20, 2012

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.