Skip to main content

Timeline for PDO with table prefix

Current License: CC BY-SA 3.0

Post Revisions

10 events
when toggle format what by license comment
May 23, 2017 at 12:21 history edited URL Rewriter Bot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 19, 2012 at 21:21 vote accept Gabriel Santos
Apr 19, 2012 at 20:38 answer added Ozzy timeline score: 1
Apr 19, 2012 at 19:34 comment added Ozzy I will post you an answer (example) to show you what I mean...
Apr 19, 2012 at 19:33 comment added Gabriel Santos @Ozzy I have tables like users, news, pages, files. I want to haveone of each (and others) table for each client. Because is one mysql with multiple client projects. So, this is not the best way.
Apr 19, 2012 at 19:27 comment added Ozzy I wonder what you make of parsing SQL then ?? But instead of the numbers you could just add their names (i.e. SELECT name FROM clients WHERE id=?) then append that to the table name. Besides whats ugly about it when no one is supposed to be able to see it (private info about your clients?). It should only be accessed through your program so the name is sort of hidden anyway.
Apr 19, 2012 at 19:25 comment added Gabriel Santos @Ozzy So ugly this way..
Apr 19, 2012 at 19:23 comment added Ozzy do you really need a client name for each table? couldn't you generate a random set of digits and append that to say "tbl_client" so that it would become like "tbl_client4455" and then store that table name in your clients table so you know which table is for which client?
Apr 19, 2012 at 19:06 answer added Francis Avila timeline score: 1
Apr 19, 2012 at 18:41 history asked Gabriel Santos CC BY-SA 3.0