h5bp / Front-end-Developer-Interview-Questions

A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore.

Home Page:https://h5bp.org/Front-end-Developer-Interview-Questions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi

aldinabdagic opened this issue · comments

Hi. Everything works ok, but if I add GROUP BY messagesusertwo to ORDER BY MAX (date) DESC, I get error Trying to get property of non-object in ??? Where am I wrong?

`$sql = "SELECT userID, firstname, lastname, avatar, state, city, messageread FROM users LEFT JOIN
users_messages ON userID = messagesuseroneID LEFT JOIN users_residence ON userresidenceID =
messagesuseroneID WHERE messagesusertwoID = '$user' AND messageread = 1";
$result = $con->query($sql);

                 if ($result->num_rows > 0) {
                 // output data of each row
                 while($row = $result->fetch_assoc())`

I think you took a wrong turn on your way to Stack Overflow

I asked a question on other websites, why not?

This isn't where you ask questions like that. It's a GitHub repository for front end developer interview questions. Asking us about SQL is nonsensical. As I say at work, if I'm doing SQL, we're in trouble.