I have an application that I\\\'m building and having some trouble with some SQL syntax that I need help with. \r\n\r\nMy database looks like this:\r\nid INT(11) AI\r\nclient_unit_id INT(11)\r\nuser_id INT(11)\r\nnumber_beds INT(11)\r\ncomment VARCHAR(2000)\r\ndate_changed DATETIME\r\n\r\nI need to return only the latest instance of the client_unit_id, with the user_id who updated it, their comment and the time_stamp. Right now, my SQL query is returning what I need, but only the old stuff and not the new:\r\n\r\n SELECT [url removed, login to view], u.unit_name, ua.number_beds, cu.total_beds, [url removed, login to view], ua.user_id, ua.date_changed\r\n FROM unit_availability AS ua\r\n INNER JOIN client_units AS cu ON cu.unit_id = ua.client_unit_id\r\n INNER JOIN units AS u ON [url removed, login to view] = cu.unit_id\r\n INNER JOIN clients AS c ON [url removed, login to view] = cu.client_id\r\n WHERE [url removed, login to view] = $clientId\r\n AND ua.client_unit_id IN (SELECT DISTINCT client_unit_id FROM unit_availability)\r\n GROUP BY ua.client_unit_id\r\n ORDER BY ua.date_changed ASC\r\n\r\nI would love to get this resolved today if possible! :)
Hi, It will be an honor for me to work with you. I will solve it today. Looking forward to hear from you.
3 freelance font une offre moyenne de $27 pour ce travail
if you can clearly mention the problem I think this will be easy task.I like to help you in this [login to view URL] you will offer the project to me
Hello, let me fix your sql query. Please send me your sql query without the "\r\n\r\n" and I will fix it for you. thanks