How can I escape the # in PHP? When I use it in a query it turns the remaining line of code into a comment. This is what I have right now:
$columns = "head1, #_search, #_stuff";
$result = mysql_query("SELECT $columns from table LIMIT $k,$j");
I can’t just put escape # right after $columns since it will just become a comment.
~edit: yes I probably should have copied the code directly, but some of it is confidential and much more complicated.
How about the following ? :
You can use `(backtick) to quote reserved words.
If you want to quote table/column name you can do the following example:
Reference