-1

For some reason it is giving me this error Parse error: syntax error, unexpected '$query' (T_VARIABLE)
code:

$query="SELECT * FROM posts, users 
WHERE posts.userID = users.userID ORDER BY postTimestamp";          
$result = mysqli_query($connection $query); 
1
  • 3
    mysqli_query($connection,$query); Commented May 24, 2014 at 12:32

2 Answers 2

1

You forget to use the ',' in $result

$result = mysqli_query($connection, $query);
Sign up to request clarification or add additional context in comments.

Comments

0

The reason is comma that you have forgotten:

$query="SELECT * FROM posts, users 
WHERE posts.userID = users.userID ORDER BY postTimestamp";          
$result = mysqli_query($connection, $query); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.