PHP Tokenizer and SQL
Posted on 2004-10-11
I am looking at writing a simple SQL interface.
I want to tokenize an SQL string so I can prepend a table identifier to table names.
The reason is I only have one database, and I want to separate out the tables so they have structure...
userlist for the blog section should be different to the userlist for the distribution list section, but theyh could have simple sql...
select * from userlist
with a tokenizer, I can prepend the DB section to the table name..
select * from dist_userlist
select * from blog_userlist
making reading a lot simpler... I think.
Any ideas how I can do this simply?