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.