kingnutter Posted May 29, 2008 Share Posted May 29, 2008 Hi everyone, I'm just getting back into php/mysql after a few months so apologies if I'm a bit rusty. I am putting together a site which allows users to create their own pages with all data stored in their own table(s). My question is, is it possible for the tables to be meaningfully named by the user e.g. generate a Mysql query within a php page along the lines of: CREATE TABLE $userCreatedTitle_data... I do hope this makes sense! Any help appreciated, Gary Quote Link to comment https://forums.phpfreaks.com/topic/107888-solved-table-names-from-strings/ Share on other sites More sharing options...
AndyB Posted May 30, 2008 Share Posted May 30, 2008 Possible? Yes. Good idea? Probably not because users may choose a name that already exists (and destroy part of your site), or use illegal character combinations, or choose a MySQL reserved word as a table name. Up to you, though. Quote Link to comment https://forums.phpfreaks.com/topic/107888-solved-table-names-from-strings/#findComment-553226 Share on other sites More sharing options...
kingnutter Posted May 30, 2008 Author Share Posted May 30, 2008 Good point, well made. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/107888-solved-table-names-from-strings/#findComment-553296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.