Should I worry about doing the same CREATE twice?
I'm new to MySQL and ezSQL and have a very basic question.
As far as I know, with plain PHP/MySQL, if you want to "insert" some new data, first you need to connect to your MySQL with a user/pass, then "CREATE DATABASE" and then select the database and then "CREATE TABLE".
This is a two part question:
1. This seems like a lot of steps. Does ezSQL (for lazy coders) eliminate any of these steps for me? The ezSQL documentation doesn't really discuss starting a new database from scratch. Most of it is about reading what's already there.
2. My second question, and perhaps more important... In most situations, I think you only want to CREATE a database once, and CREATE a table once. Do you bother writing code to make sure this happens only once, or is it harmless to CREATE the database/tables each time your PHP code executes? In other words: Would I first test to see if a database or table already exists so that I won't CREATE it twice? Or is that a waste of time?
I think you get my drift. I was thinking, "Well, I can learn this myself by trial and error." But I'm sure someone here has done this a million times. Thanks for your help!
