Skip to content
Advertisement

Check For Existing Table Using variable

I was wondering how to incorporate a variable into a PHP statement to check if a table exists. For some reason the query does not accept the variable. Here is what I have:

JavaScript

Advertisement

Answer

The statement needed a tilde around the variable. Here is the final statement: $query101 = "select 1 from `$id` LIMIT 1";

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement