Just creating an installation script with db_mysql from phplib. I have got all the tables created etc but what i need to do is the first bit.
Basically, i want it to do something like this:
i) attempt to connect to the db server. If that fails give message.
ii) check to see if the database is there. If not attempt to create it. If that fails give error message else continue.
iii) if datbase is there, continue.
So basically what i don't know how to do using phplib is check for a database's existance and also creata a database. do you just do $query = CREATE database blah for that bit? if so how do you check for the existance of a database and prevent a message error if it is not there?
thanks.





Bookmarks