bassicaly i need a query that will select everything from a specific table named post where varies, i have tried
"SELECT * FROM '%_post'"
but it returns an error?
any idea how i can solve this?
$varTablePrefix = "whatever";
$sql = "SELECT * FROM " . $varTablePrefix . "_post";
the only problem with your code is that the Prefix is specified by the user when the register on my site? so potentialy i could have 40+ *_posts all with different prefixes?
Either redesign your database to something sensible, or write a big query that has SELECT queries for each and every such table, joined together by UNION. (Look it up.)
i managed to solve it i have the two tables one that stores all the user registration in which there is a field called "folder" the value of "folder" is also assigned to the prefix so i just wrote an extra query to get the folder then i applied that to the second query