0

I have a variable $table which will hold the value of the user input I want to use the variable $table in my sql statement after the FROM.

Ex:

Select * FROM $table;

I want to know if its possible how I have written it.

1
  • Yes, it is possible. Commented Apr 8, 2018 at 10:35

1 Answer 1

0

It is possible but a very bad practice and the way of doing it is different.

Sign up to request clarification or add additional context in comments.

1 Comment

$dbquerystring = "Select * FROM ".$table;

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.