Find Jobs
Hire Freelancers

Complex MySQL help needed

$30-100 USD

Selesai
Dibuat sekitar 13 tahun yang lalu

$30-100 USD

Dibayar ketika dikirim
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 Proyek: 3183734

Tentang proyek

4 proposal
Proyek remot
Aktif 13 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
Diberikan kepada:
Avatar Pengguna
See private message.
$34 USD dalam 14 hari
5,0 (81 ulasan)
6,6
6,6
4 freelancer menawar dengan rata-rata $48 USD untuk pekerjaan ini
Avatar Pengguna
See private message.
$46,75 USD dalam 14 hari
5,0 (441 ulasan)
6,6
6,6
Avatar Pengguna
See private message.
$51 USD dalam 14 hari
5,0 (143 ulasan)
5,8
5,8
Avatar Pengguna
See private message.
$59,50 USD dalam 14 hari
4,7 (9 ulasan)
2,9
2,9

Tentang klien

Bendera UNITED STATES
San Francisco, United States
5,0
216
Memverifikasi Metode pembayaran
Anggota sejak Jul 22, 2002

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.