Jump to content

Archived

This topic is now archived and is closed to further replies.

Sephiriz

Syntax Error?

Recommended Posts

Ok, suddenly I\'ve been receiving syntax warnings that never before appeared.

 

What is wrong with the following query:

$query10 = \"SELECT `Name` FROM `users` WHERE `ID` = \'$_SESSION[user]\'\";

Share this post


Link to post
Share on other sites
$query10 = \\\"SELECT `Name` FROM `users` WHERE `ID` = \'{$_SESSION[user]}\'\\\";

 

echo out the session user to be sure it has the value you expect it to.

Share this post


Link to post
Share on other sites

I see, can you provide me with a link as to where to find documentation for the exact syntax I should use that will always work?

 

Also, what would be the correct way to make this query:

$query2 = \"SELECT * FROM $Name WHERE Genre = \'$_GET[Genre]\' ORDER BY $View\";

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.