Find Jobs
Hire Freelancers

Php function to get data from mysql.

$10-30 USD

En curso
Publicado hace más de 7 años

$10-30 USD

Pagado a la entrega
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.
ID del proyecto: 12711134

Información sobre el proyecto

21 propuestas
Proyecto remoto
Activo hace 7 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
21 freelancers están ofertando un promedio de $26 USD por este trabajo
Avatar del usuario
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 en 0 día
4,8 (128 comentarios)
6,9
6,9
Avatar del usuario
A proposal has not yet been provided
$20 USD en 1 día
4,9 (328 comentarios)
6,9
6,9
Avatar del usuario
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 en 1 día
4,8 (65 comentarios)
5,9
5,9
Avatar del usuario
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 en 1 día
4,9 (104 comentarios)
5,7
5,7
Avatar del usuario
Hello there i am a professional and have extensive experience, please contact to discuss in details.. i will be waiting thanks regards
$30 USD en 2 días
5,0 (28 comentarios)
5,3
5,3
Avatar del usuario
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 en 1 día
5,0 (9 comentarios)
3,8
3,8
Avatar del usuario
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 en 1 día
5,0 (14 comentarios)
3,4
3,4
Avatar del usuario
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 en 1 día
5,0 (2 comentarios)
2,4
2,4
Avatar del usuario
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 en 3 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de SPAIN
madrid, Spain
5,0
126
Forma de pago verificada
Miembro desde mar 20, 2012

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.