in reply to Re: mapping complex structures to mysql tables
in thread mapping complex structures to mysql tables
Fantastic, that was just what I was looking for!
I might suggest testing to see if the table exists first before creating it:
if (do('SELECT 1 FROM t LIMIT 1')){ $db->do('CREATE TABLE t (key VARCHAR, value VARCHAR, ref INT)') }
Also, some people may like comment out the "DROP TABLE" statement.
Thanks for sharing your code.
|
|---|