MYSQL version: 5.5.24
I've got a problem.
For my project in a class I want to show the characters of the person who is currently logged in.
I get it to show every character in the database "characters" but not the logged in. I've tried to put this code in the WHERE but it will just ignore it and all of the other code jsut gets commented away when I do the "" to make it visible (in php) a friend of mine have written a C++ program that does this exact same thing altough I don't get it to work.
So my question is what should I put in the WHERE to get the characters.name of the "current user"
I've thought of making the: WHERE accounts.id = " . htmlentities($_SESSION['username'] ." Altough these two " makes so the rest of the code gets commented away and I've tried to put an extra " but nothing happens and I need the two " too make the htmlentities correct. I know this is both PHP and MYSQL but since it's the SQL part I need help with I put it here. If any admin see this as the wrong place to have my post please move it in that case or tell me to redo it at the right place