I am getting this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
This is the code I used:
$sql = mysqli_query($con, "SELECT * FROM ".decrypt($_SESSION["name"], ENCRYPTION_KEY)."_table "); while ($row = mysqli_fetch_array($con)) { // displays data } echo mysqli_error($con);
I don't know what the problem is,but when I do this:echo "SELECT * FROM ".decrypt($_SESSION["name"], ENCRYPTION_KEY)."_table ");
I am getting this:
SELECT * FROM ab_table
The above query is correct,but why does it flag an error?