Find Jobs
Hire Freelancers

Complex MySQL help needed

$30-100 USD

Terminado
Publicado hace alrededor de 13 años

$30-100 USD

Pagado a la entrega
I have a complex MySQL query that I need help with. I have limited understanding of MySQL, so I'm going to explain in English what I need. Let me know if you have any questions. Basically I need to get values from three tables, where the values selected from the second/third table depend on the first. The three tables are: TableUsers / TableFieldValues / TableURL TableUsers: This table has several columns. Column userID is the unique/index. ......Select userID, username, displayname, photonum TableFieldValues: This table has 3 columns of interest ('item_id' / 'field_id' / 'item_field_value'). There is no unique/index. The column 'item_id' corresponds to 'userID' of the first table. ......For each of the TableUsers results (from first table), look within all rows of TableFieldValues where ([login to view URL] = [login to view URL]). Remove from query any userID/item_id where the field_id='25' AND item_field_value<>'US' Then select: [item_field_value where field_id='15' / as City], [item_field_value where field_id='19' / as Street], [item_field_value where field_id='16' / as Postal]. WHERE Postal>94030 (remove from query any results that are less than 94030). TableURL: The three important columns here are 'parent_file_id', 'type', and 'imgURL' ….. Find the single row where ([login to view URL] = [login to view URL]) AND (type.TableURL='thumbicon'). Then select the value of imgURL from that row. Once those results are collected, I want to display all results with photonum>0 first, and photonum=0 after that. However, I do not want to orderby photonum beyond that. Rather, I want to ORDER BY Postal ASC. I want to display the results on a page like: $userID - $username - $displayname - $city - $street - $postal - $imgurl $userID - $username - $displayname - $city - $street - $postal - $imgurl $userID - $username - $displayname - $city - $street - $postal - $imgurl Since I am using PHP, I would like the MySQL statement provided with the needed PHP code. Hope that all makes sense. Please let me know if you have any questions. In your bid, please let me know how long it will take you to provide the code.
ID del proyecto: 3183734

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 13 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
Adjudicado a:
Avatar del usuario
See private message.
$34 USD en 14 días
5,0 (81 comentarios)
6,6
6,6
4 freelancers están ofertando un promedio de $48 USD por este trabajo
Avatar del usuario
See private message.
$46,75 USD en 14 días
5,0 (441 comentarios)
6,6
6,6
Avatar del usuario
See private message.
$51 USD en 14 días
5,0 (143 comentarios)
5,8
5,8
Avatar del usuario
See private message.
$59,50 USD en 14 días
4,7 (9 comentarios)
2,9
2,9

Sobre este cliente

Bandera de UNITED STATES
San Francisco, United States
5,0
216
Forma de pago verificada
Miembro desde jul 22, 2002

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.