The Little Guy Posted November 19, 2010 Share Posted November 19, 2010 If I run this: mysql_query("CREATE DATABASE IF NOT EXISTS `{$this->db['db']}`", $this->tdb); Will mysql_query() return true or false if the database already exists? I can not run this on my server due to permissions. Link to comment https://forums.phpfreaks.com/topic/219236-mysql_query-create-database-if-not-exists/ Share on other sites More sharing options...
mikosiko Posted November 19, 2010 Share Posted November 19, 2010 I can not run this on my server due to permissions. then mysql_query is going to produce an error.... Will mysql_query() return true or false if the database already exists? no Link to comment https://forums.phpfreaks.com/topic/219236-mysql_query-create-database-if-not-exists/#findComment-1136911 Share on other sites More sharing options...
AbraCadaver Posted November 19, 2010 Share Posted November 19, 2010 If the database exists it will return true and if it does not exist and it is able to create it successfully it will return true. Otherwise it will return false. Link to comment https://forums.phpfreaks.com/topic/219236-mysql_query-create-database-if-not-exists/#findComment-1136916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.